| dsemRTMB | R Documentation |
Fits a dynamic structural equation model
dsemRTMB(
sem,
tsdata,
family = rep("fixed", ncol(tsdata)),
estimate_delta0 = FALSE,
log_prior = function(p) 0,
control = dsem_control(),
covs = colnames(tsdata)
)
sem |
Specification for time-series structural equation model structure
including lagged or simultaneous effects. See Details section in
|
tsdata |
time-series data, as outputted using |
family |
Character-vector listing the distribution used for each column of |
estimate_delta0 |
Boolean indicating whether to estimate deviations from equilibrium in initial year as fixed effects, or alternatively to assume that dynamics start at some stochastic draw away from the stationary distribution |
log_prior |
A user-provided function that takes as input the list of
parameters |
control |
Output from |
covs |
optional: a character vector of one or more elements, with each element giving a string of variable
names, separated by commas. Variances and covariances among all variables in each such string are
added to the model. Warning: covs="x1, x2" and covs=c("x1", "x2") are not equivalent:
covs="x1, x2" specifies the variance of x1, the variance of x2, and their covariance,
while covs=c("x1", "x2") specifies the variance of x1 and the variance of x2 but not their covariance.
These same covariances can be added manually via argument |
dsemRTMB is interchangeable with dsem, but uses RTMB
instead of TMB for estimation. Both are provided for comparison and
real-world comparison. See ?dsem for more details
An object (list) of class dsem, fitted using RTMB
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.