autorregressive交叉滞后面板模型lavaan

时间:2018-08-18 10:00:50

标签: r-lavaan

我只是想运行一个带有两个应该滞后的变量和3个时变协变量以及3个其他时不变协变量的自回归交叉滞后面板模型。 我在用lavaan。这是我的语法。

library(lavaan)
clpmf <- '
# synchronous covariances, fts: frailty, and mvpa: physical activity both 
measured at two time points. 
fts1 ~~ mvpa1 
fts2 ~~ mvpa2 
# autoregressive + cross-lagged paths
fts2 ~ fts1 + mvpa1 + age + sex + bmi + sppb + mms + edu + marital + eco
mvpa2 ~ mvpa1 + fts1 + age + sex  +  bmi +sppb + mms+ edu+ marital + eco
'
# fit the model. include 'fixed.x=FALSE' to esimate exogenous covariance 
fitf <- sem(clpmf, data=dataf, fixed.x=FALSE, missing = "pairwise")

summary(fitf, fit.measures = T, standardized=TRUE)

我的问题是:以上正确吗?我错过了什么吗?我必须包括任何随机截距吗?

0 个答案:

没有答案