Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dev #1

Merged
merged 11 commits into from
Dec 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
^data-raw$
^\.github$
24 changes: 18 additions & 6 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,36 +1,48 @@
Package: dsem
Type: Package
Title: Fit Dynamic Structural Equation Models
Version: 1.0
Date: 2023-06-21
Version: 1.0.0
Date: 2023-12-04
Authors@R:
c(person(given = "Anon",
family = "Ymous",
c(person(given = "James",
family = "Thorson",
role = c("aut", "cre"),
email = "James.Thorson@noaa.gov")
)
Imports:
TMB,
TMB (>= 1.9.7),
Matrix (>= 1.6.3),
sem,
igraph,
methods
Depends:
R (>= 4.0.0),
Suggests:
knitr,
AER,
phylopath,
rmarkdown,
reshape,
gridExtra,
dynlm,
MARSS,
ggplot2,
ggpubr,
ggraph,
grid,
vars,
testthat
Enhances:
rstan,
tmbstan
LinkingTo:
TMB,
RcppEigen
Description: Applies dynamic structural equation models to time-series data
with generic and simplified specification for simultaneous and lagged
effects.
effects. Methods are described in Thorson et al. (In revision)
"Dynamic structural equation models synthesize ecosystem dynamics
constrained by ecological mechanisms."
License: GPL-3
Encoding: UTF-8
RoxygenNote: 7.2.3
Expand Down
674 changes: 674 additions & 0 deletions LICENSE

Large diffs are not rendered by default.

16 changes: 15 additions & 1 deletion NAMESPACE
Original file line number Diff line number Diff line change
@@ -1,29 +1,43 @@
# Generated by roxygen2: do not edit by hand

S3method(logLik,dsem)
S3method(plot,dsem)
S3method(predict,dsem)
S3method(print,dsem)
S3method(residuals,dsem)
S3method(simulate,dsem)
S3method(summary,dsem)
S3method(vcov,dsem)
export(TMBAIC)
export(as_fitted_DAG)
export(as_sem)
export(classify_variables)
export(dsem)
export(dsem_control)
export(fit_tmb)
export(list_parameters)
export(make_ram)
export(make_dsem_ram)
export(parse_path)
importFrom(Matrix,Cholesky)
importFrom(Matrix,solve)
importFrom(TMB,MakeADFun)
importFrom(TMB,compile)
importFrom(TMB,dynlib)
importFrom(TMB,sdreport)
importFrom(TMB,summary.sdreport)
importFrom(igraph,graph_from_data_frame)
importFrom(igraph,plot.igraph)
importFrom(methods,is)
importFrom(sem,sem)
importFrom(stats,"tsp<-")
importFrom(stats,.preformat.ts)
importFrom(stats,logLik)
importFrom(stats,na.omit)
importFrom(stats,nlminb)
importFrom(stats,optimHess)
importFrom(stats,pnorm)
importFrom(stats,rnorm)
importFrom(stats,simulate)
importFrom(stats,time)
importFrom(stats,vcov)
useDynLib(dsem, .registration = TRUE)
7 changes: 4 additions & 3 deletions R/classify_variables.R
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@

#' Classify variables path
#' @title Classify variables path
#'
#' \code{classify_variables} is copied from \code{sem:::classifyVariables}
#' @description \code{classify_variables} is copied from \code{sem:::classifyVariables}
#'
#' Copied with permission from John Fox under licence GPL (>= 2)
#' @details
#' Copied from package `sem` under licence GPL (>= 2) with permission from John Fox
#'
#' @param model SEM model
#'
Expand Down
12 changes: 11 additions & 1 deletion R/data.R
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,20 @@ NULL
#' @keywords data
NULL

#' Isle Royale wolf and moose
#' @title Isle Royale wolf and moose
#'
#' @description
#' Data used to demonstrate and test cross-lagged (vector autoregressive) models
#'
#' @details
#' Data extracted from file "Data_wolves_moose_Isle_Royale_June2019.csv" available at
#' \url{https://isleroyalewolf.org/data/data/home.html} and obtained 2023-06-23.
#' Reproduced with permission from John Vucetich, and generated by the
#' Wolves and Moose of Isle Royale project.
#'
#' @references
#' Vucetich, JA and Peterson RO. 2012. The population biology of Isle Royale wolves and moose: an overview. \url{https://www.isleroyalewolf.org}
#'
#' @name isle_royale
#' @docType data
#' @usage data(isle_royale)
Expand Down
Loading