ctsem allows for easy specification and fitting of a range of continuous and discrete time dynamic models, including multiple indicators (dynamic factor analysis), multiple, potentially higher order processes, and time dependent (varying within subject) and time independent (not varying within subject) covariates. Classic longitudinal models like latent growth curves and latent change score models are also possible. Version 1 of ctsem provided SEM based functionality by linking to the OpenMx software, allowing mixed effects models (random means but fixed regression and variance parameters) for multiple subjects. For version 2 of the R package ctsem, we include a Bayesian specification and fitting routine that uses the Stan probabilistic programming language, via the rstan package in R. This allows for all parameters of the dynamic model to individually vary, using an estimated population mean and variance, and any time independent covariate effects, as a prior. ctsem version 1 is documented in a JSS publication (Driver, Voelkle, Oud, 2017), and in R vignette form at https://cran.r-project.org/package=ctsem/vignettes/ctsem.pdf . The Bayesian approach is outlined in Introduction to Hierarchical Continuous Time Dynamic Modelling with ctsem, at https://www.researchgate.net/publication/310747987_Introduction_to_Hierarchical_Continuous_Time_Dynamic_Modelling_With_ctsem . To cite ctsem please use the citation("ctsem") command in R.

News

ctsem news:

6/11/2018

2.7.3

Updated for rstan 2.18.1 compatibility

Non-linear dynamics now handled using mixture of extended and unscented filters for improved speed.

Priors for hierarchical variance modified so prior for total variance has consistent shape regardless of dimension.

Optimization / importance sampling works well for many cases, see arguments using ?ctStanFit.

ctKalman can now be used to plot individual trajectories from ctFit objects and ctStanFit objects (ctStanKalman function no longer exists).

ctStanFit now handles missing data on covariate effects -- time dependent predictors are set to zero, time independent predictors are imputed with a normal(0,10) prior (can adjust via the $tipredsimputedprior subobject of the ctStanModel).

2.3.1

ctFit: discreteTime switch no longer gives errors when traits included

ctFit: transformedParams=FALSE argument no longer throwing errors.

ctStanKalman: correct handling of missing data for plotting.

3/3/2017

2.3.0

Fixes:

TRAITVAR in frequentist ctsem was incorrectly accounting for differing time
intervals since v2.0.0. TRAITVAR is now (again) reported as total between subjects
variance.

Default quantiles on ctStanDiscretePars adjusted to 95%.

Hierarchical correlation probabilities adjusted in ctStanFit for more consistent
behaviour with high dimensional processes.

Changes:

Default to unstandardised cross effects plots.

1/2/2017

2.2.0

Changes:

Time dependent predictors now have instantaneous effect in both frequentist and
Bayesian approaches, and the documentation is updated to reflect this.
Previously, no TDpreds affecting first time point in frequentist.
Accordingly, wide data structure is changed, with an extra column
per predictor and predictors now sorted by time point as for indicators.
See vignette for example.