model1 <- '
# measurement model
LV1 =~ JD1 + JD2 + JP1 + JP2 + JP3 + JI1 + JI2
LV2 =~ E1 + E2 + E3
LV3 =~ SRS1 + SRS2
LV4 =~ LC1 + LC2 + LA1 + LA2 + LA3
# regression
LV4 ~ c(1, 1)*LV3
LV3 ~ c(1, 1)*LV1 + c(NA, NA)*LV2
'
model.us <- sem(model1, data=mesp, group="COO",
group.equal=c("loadings", "intercepts",
"residuals"), group.partial=c("JD2", "JP2"),
estimator = "MLM", se = "robust", test =
"Satorra-Bentler") # Unconstrained structural model
model.r <- sem(model1, data=mesp, group="COO",
group.equal=c("loadings", "intercepts",
"residuals", "regressions"),
group.partial=c("JD2", "JP2"), estimator = "MLM",
se = "robust", test = "Satorra-Bentler")
anova(model.us, model.r)
Thanks,
Paul
I just wanted to double-check if I have figured out the right approach to compare regression coefficients (i.e., causal paths) across groups. I want to test whether the regression coefficients between LV2 and LV3 differ across my two groups. Hence, I have constrained all coefficients except this one.
LV3 ~ c(beta32, beta32)*LV2
Did you mean to constrain the other regressions to 1 across both groups?
Fit both models and compare their fit using latTestLRT().
Does it matter to which value I constrain them? I simply want to compare the regressions on LV3 ~ LV2 across my two groups, so I thought the others should be constrained so that any difference can be attributed to LV3 ~ LV2, correct?