R数据分析:随机截距交叉滞后RI-CLPM与传统交叉滞后CLPM
给模型一些限制条件后继续验证数据
This can be done by comparing the fit of a (nested) model with constraints to the fit of the more general model using a chi-square difference test (Δχ2)
RI-CLPM实例操练
RICLPM <- '
# 随机截距
RIx =~ 1*x1 + 1*x2 + 1*x3 + 1*x4 + 1*x5
RIy =~ 1*y1 + 1*y2 + 1*y3 + 1*y4 + 1*y5
# 个体内的变量设定
wx1 =~ 1*x1
wx2 =~ 1*x2
wx3 =~ 1*x3
wx4 =~ 1*x4
wx5 =~ 1*x5
wy1 =~ 1*y1
wy2 =~ 1*y2
wy3 =~ 1*y3
wy4 =~ 1*y4
wy5 =~ 1*y5
# 个体内交叉滞后设定
wx2 + wy2 ~ wx1 + wy1
wx3 + wy3 ~ wx2 + wy2
wx4 + wy4 ~ wx3 + wy3
wx5 + wy5 ~ wx4 + wy4
# 个体内共变设定
wx1 ~~ wy1
wx2 ~~ wy2
wx3 ~~ wy3
wx4 ~~ wy4
wx5 ~~ wy5
# 随机截距的方差和共变
RIx ~~ RIx
RIy ~~ RIy
RIx ~~ RIy#这个系数是需要报告的
# 个体内变量的方差
wx1 ~~ wx1
wy1 ~~ wy1
wx2 ~~ wx2
wy2 ~~ wy2
wx3 ~~ wx3
wy3 ~~ wy3
wx4 ~~ wx4
wy4 ~~ wy4
wx5 ~~ wx5
wy5 ~~ wy5
'
RICLPM.fit <- lavaan(RICLPM, data = dat, missing = 'ML', meanstructure = T, int.ov.free = T)
summary(RICLPM.fit, standardized = T)
Moreover, we find a significant positive covariance between the random intercepts, suggesting that individuals who have more sleep problems, in general, are also more anxious in general.
什么时候选随机截距交叉滞后
小结
赞 (0)