Learn R Programming

⚠️There's a newer version (3.10.4) of this package.Take me there.

See the NEWS file for recent updates!

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 forthcoming JSS publication (Driver, Voelkle, Oud, in press), and in R vignette form at https://cran.r-project.org/package=ctsem/vignettes/ctsem.pdf . The new Bayesian approach is outlined in the vignette, Introduction to Hierarchical Continuous Time Dynamic Modelling with ctsem, at https://cran.r-project.org/package=ctsem/vignettes/hierarchical.pdf . To cite ctsem please use the citation("ctsem") command in R.

Copy Link

Version

Install

install.packages('ctsem')

Monthly Downloads

773

Version

2.1.0

License

GPL-3

Issues

Pull Requests

Stars

Forks

Maintainer

Charles Driver

Last Published

December 22nd, 2016

Functions in ctsem (2.1.0)

AnomAuth

AnomAuth
ctDensity

ctDensity
ctCI

ctCI Computes confidence intervals on specified parameters / matrices for already fitted ctsem fit object.
ctDiscretePars

ctDiscretePars
ctCompareExpected

ctCompareExpected Compares model implied to observed means and covariances for panel data fit with ctsem.
ctDeintervalise

ctDeintervalise
ctExample1

ctExample1
ctExample1TIpred

ctExample1TIpred
ctIntervalise

Converts absolute times to intervals for wide format ctsem panel data
ctKalman

ctKalman
ctExample2level

ctExample2level
ctLongToWide

ctLongToWide Restructures time series / panel data from long format to wide format for ctsem analysis
ctExample4

ctExample4
ctIndplot

ctIndplot
ctFit

Fit a ctsem object
ctGenerate

ctGenerate
ctStanDiscretePars

ctStanDiscretePars
ctModel

Define a ctsem model
ctStanKalmanPlot

ctStanKalmanPlot
ctStanDiscreteParsPlot

ctStanDiscreteParsPlot
ctStanParnames

ctStanParnames
summary.ctsemFit

Summary function for ctsemFit object
sdpcor2cov

sdcor2cov
ctCollapse

ctCollapse Easily collapse an array margin using a specified function.
ctPlot

singlePlot
ctMultigroupFit

Fits a multiple group continuous time model.
ctExample3

ctExample3
ctStanFit

ctStanFit
ctStanKalman

ctStanKalman
plot.ctsemFit

Plotting function for object class ctsemFit
ctstantestfit

ctstantestfit
plot.ctsemMultigroupFit

Plot function for ctsemMultigroupFit object
longexample

longexample
ctStanTIpredeffects

Get time independent predictor effect estimates
Oscillating

Oscillating
ctPlotArray

Plots a three dimensional array
summary.ctStanFit

summary.ctStanFit
summary.ctsemMultigroupFit

Summary function for ctsemMultigroupFit object
ctStanPlotPost

ctStanPlotPost
ctPoly

Plots uncertainty bands
plot.ctStanFit

plot.ctStanFit
ctstantestdat

ctstantestdat
plot.ctStanModel

Prior plotting
ctExample2

ctExample2
ctsem

ctsem
ctStanContinuousPars

ctStanContinuousPars
ctPSMfit

ctPSMfit
ctRefineTo

ctRefineTo
ctWideToLong

ctWideToLong Convert ctsem wide to long format
ctWideNames

ctWideNames sets default column names for wide ctsem datasets. Primarily intended for internal ctsem usage.
datastructure

datastructure
inv_logit

Inverse logit