Package: dsem 3.0.0

dsem: Dynamic Structural Equation Models

Applies dynamic structural equation models to time-series data with generic and simplified specification for simultaneous and lagged effects. Methods are described in Thorson et al. (2024) "Dynamic structural equation models synthesize ecosystem dynamics constrained by ecological mechanisms."

Authors:James Thorson [aut, cre], Maurice Goodman [ctb], Wouter van der Bijl [ctb], Giovanni M. Marchetti [ctr]

dsem_3.0.0.tar.gz
dsem_3.0.0.zip(r-4.7)dsem_3.0.0.zip(r-4.6)dsem_3.0.0.zip(r-4.5)
dsem_3.0.0.tgz(r-4.6-x86_64)dsem_3.0.0.tgz(r-4.6-arm64)dsem_3.0.0.tgz(r-4.5-x86_64)dsem_3.0.0.tgz(r-4.5-arm64)
dsem_3.0.0.tar.gz(r-4.7-arm64)dsem_3.0.0.tar.gz(r-4.7-x86_64)dsem_3.0.0.tar.gz(r-4.6-arm64)dsem_3.0.0.tar.gz(r-4.6-x86_64)
dsem_3.0.0.tgz(r-4.6-emscripten)
manual.pdf |manual.html
card.svg |card.png
dsem/json (API)
NEWS

# Install 'dsem' in R:
install.packages('dsem', repos = c('https://james-thorson-noaa.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/james-thorson-noaa/dsem/issues

Pkgdown/docs site:https://james-thorson-noaa.github.io

Uses libs:
  • c++– GNU Standard C++ Library v3
  • openmp– GCC OpenMP (GOMP) support library
Datasets:

On CRAN:

Conda:

cppopenmp

8.36 score 19 stars 1 packages 84 scripts 813 downloads 23 exports 55 dependencies

Last updated from:a92d6702ba. Checks:13 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-devel-arm64OK372
linux-devel-x86_64OK376
source / vignettesOK526
linux-release-arm64OK382
linux-release-x86_64OK396
macos-release-arm64OK302
macos-release-x86_64OK930
macos-oldrel-arm64OK260
macos-oldrel-x86_64OK615
windows-develOK426
windows-releaseOK380
windows-oldrelOK429
wasm-releaseOK225

Exports:as_fitted_DAGcAICclassify_variablesconvert_equationsdsemdsem_controlfixedgaussian_fixed_sdlist_parameterslognormalloo_residualsmake_dfamake_dsem_rammake_matricesmake_msvparse_pathpartition_variancerk4sysstepwise_selectiontest_dsepTMBAICtotal_effecttweedie

Dependencies:backportsbase64enccachemcheckmateclicpp11dplyrfarverfastmapgenericsggforceggplot2ggraphggrepelgluegraphlayoutsgridExtragtableigraphisobandjsonlitelabelinglatticelifecyclemagrittrMASSMatrixmemoisepillarpkgconfigpolyclippurrrR6RColorBrewerRcppRcppArmadilloRcppEigenrlangRTMBS7scalesstringistringrsystemfontstibbletidygraphtidyrtidyselectTMBtweenrutf8vctrsviridisviridisLitewithr

Demonstration of selected features

Rendered fromfeatures.Rmdusingknitr::rmarkdownon Jun 16 2026.

Last update: 2026-06-16
Started: 2025-04-08

dsem model description

Rendered frommodel-description.Rmdusingknitr::rmarkdownon Jun 16 2026.

Last update: 2026-06-16
Started: 2025-04-08

MGARCH

Rendered fromMGARCH.Rmdusingknitr::rmarkdownon Jun 16 2026.

Last update: 2026-06-16
Started: 2026-06-16

Nonlinear dynamics

Rendered fromnonlinear.Rmdusingknitr::rmarkdownon Jun 16 2026.

Last update: 2026-06-16
Started: 2026-05-12

Random slopes

Rendered fromrandom_slopes.Rmdusingknitr::rmarkdownon Jun 16 2026.

Last update: 2026-05-12
Started: 2026-05-12

Spatial diffusion

Rendered fromspatial_diffusion.Rmdusingknitr::rmarkdownon Jun 16 2026.

Last update: 2026-05-12
Started: 2025-02-13

Readme and manuals

Help Manual

Help pageTopics
Convert output from package dsem to phylopathas_fitted_DAG
Bering Sea marine ecosystembering_sea
Calculate conditional AICcAIC
Classify variables pathclassify_variables
Convert equations notationconvert_equations
Fit dynamic structural equation modeldsem
Detailed control for dsem structuredsem_control
Fit dynamic structural equation modeldsemRTMB
Family for data that are known without errorfixed
Gaussian with known standard deviation for measurement errorsgaussian_fixed_sd
Lynx-Hare dynamicshare_lynx
Isle Royale wolf and mooseisle_royale
Lake washington planktonlake_washington
List fixed and random effectslist_parameters
Marginal log-likelihoodlogLik.dsem
Lognormal distributionlognormal
Calculate leave-one-out residualsloo_residuals
Make text for dynamic factor analysismake_dfa
Make a RAM (Reticular Action Model)make_dsem_ram
Make path matricesmake_matrices
Make text for multivariate stochastic volatility modelmake_msv
Paramesium-Didinium dynamicsparamesium_didinium
Parse pathparse_path
Partition variance in one variable due to another (EXPERIMENTAL)partition_variance
Pacific Decadal Oscillation and Departure Bay temperaturespdo_departure_bay
Simulate dsemplot.dsem
predictions using dsempredict.dsem
Print fitted dsem objectprint.dsem
Make a RAM (Reticular Action Model)read_model
Calculate residualsresiduals.dsem
Classical Runge-Kutta for system of equationsrk4sys
Sea otter trophic cascadesea_otter
Simulate dsemsimulate.dsem
Simulate dsemstepwise_selection
summarize dsemsummary.dsem
Test d-separationtest_dsep
Calculate marginal AIC for a fitted modelTMBAIC
Calculate total effectstotal_effect
Tweedie distributiontweedie
Extract Variance-Covariance Matrixvcov.dsem