Hey, lavaan masters! First time posting in this community. I'm conducting multigroup path analysis with a model in which the relationships between three predictors and one outcome are mediated (in parallel) by 3 other variables. I'm running into an issue where the regression parameters for one of my four groups aren't constrained to equality unlike those of the other groups. What could be the issue? Below is my script (let me know if there's anything else wrong with my script—even if unrelated to this inquiry). Additionally, if anyone knows how to make these analyses run faster, please let me know. Last time I ran these analyses, it took around 6 hours (doesn't look too good for when I have to sequentially release the constraints...); granted, I have 300k+ respondents, so I guess it isn't too surprising (is there any way to use more than just one of my device's cores? I'm a total R newbie).
Model.2 <- ' Outcome ~ b1 * M1 + b2 * M2 + b3 * M3 + b4 * M4 + b5 * M5 + b6 * M6 + c1 * P1 + c2
* P2 + c3 * P3
M1 ~ a1 * P1 + a2 * P2 + a3 * P3
M2 ~ a4 * P1 + a5 * P2 + a6 * P3
M3 ~ a7 * P1 + a8 * P2 + a9 * P3
M4 ~ a10 * P1 + a11 * P2 + a12 * P3
M5 ~ a13 * P1 + a14 * P2 + a15 * P3
M6 ~ a16 * P1 + a17 * P2 + a18 * P3
ab1 := a1*b1
ab2 := a2*b1
ab3 := a3*b1
ab4 := a4*b2
ab5 := a5*b2
ab6 := a6*b2
ab7 := a7*b3
ab8 := a8*b3
ab9 := a9*b3
ab10 := a10*b4
ab11 := a11*b4
ab12 := a12*b4
ab13 := a13*b5
ab14 := a14*b5
ab15 := a15*b5
ab16 := a16*b6
ab17 := a17*b6
ab18 := a18*b6
total := c1 + c2 + c3 + ab1 + ab2 + ab3 + ab4 + ab5 + ab6 + ab7 + ab8 + ab9 + ab10 + ab11 + ab12 + ab13 + ab14 + ab15 + ab16 + ab17 + ab18 '
SEM.2 <- sem(Model.2, data = data_df, group = "GROUP", group.equal = c("regressions"), se = "bootstrap", bootstrap = 5000)
summary(SEM.2, standardized=F, fit=T, rsquare=T)
parameterestimates(SEM.2, boot.ci.type="bca.simple", standardized = T)
the regression parameters for one of my four groups aren't constrained to equality unlike those of the other groups. What could be the issue?
if anyone knows how to make these analyses run faster, please let me know ... I have 300k+ respondents
How would you go about comparing regression coefficients across groups? This is my first time doing multigroup path analysis with more than 2 groups. When I free a constraint across all 4 groups and my model fit significantly improves, would the next step then be pairwise comparisons—what would that look like?
I'm having trouble implementing your recommendations regarding Wald tests and defining parameters.
You received this message because you are subscribed to the Google Groups "lavaan" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lavaan+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/lavaan/024f3d3d-5a5d-4838-b2f4-1154b8bfafc2o%40googlegroups.com.
should the last line have been summary(fit1) ?