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
DESCRIPTION |NEWS
card.svg |card.png
dsem/json (API)

# 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.46 score 21 stars 1 packages 84 scripts 946 downloads 23 exports 55 dependencies

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

TargetResultTimeFilesSyslog
linux-devel-arm64OK387
linux-devel-x86_64OK459
source / vignettesOK480
linux-release-arm64OK374
linux-release-x86_64OK467
macos-release-arm64OK284
macos-release-x86_64OK1049
macos-oldrel-arm64OK224
macos-oldrel-x86_64OK506
windows-develOK394
windows-releaseOK398
windows-oldrelOK393
wasm-releaseOK272

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
Comparison with linear models | Comparison with generalized linear models | Comparison with dynamic linear models | Comparison with vector autoregressive models | Multi-causal ecosystem synthesis | Site-replicated trophic cascade | Works cited

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

dsem model description
Dynamic structural equation models | Viewpoint 1: Software interface | Viewpoint 2: Mathematical details | Measurement errors | Initial conditions and total effects | Constant conditional vs. marginal variance | Reduced rank models | Works cited

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

MGARCH
Multivariate Generalized Autoregressive Conditional Heteroskedasticity (MGARCH) models | Exploratory MGARCH | Confirmatory MGARCH | Comparison

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

Nonlinear dynamics
Nonlinearity

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

Random slopes
Random slopes models

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

Spatial diffusion
Approximating diffusive movement among adjacent spatial strata

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