I have bee able to free all latent variable means using:
fit <- cfa (MyModel, data=data, missing = "ML", group="FRcorrect4", group.equal=c("loadings", "intercepts"))
But I am having trouble constraining the Inhibit, Update and Switch means to be equal across groups. Is there an easy way to do this?
Sarah
fit <- cfa (MyModel, data=data, missing = "ML", group="FRcorrect4", group.equal=c("loadings", "intercepts"))
Error in solve.default(E) :
system is computationally singular: reciprocal condition number = 8.99305e-19
Warning message:
In estimateVCOV(lavaanModel, samplestats = lavaanSampleStats, options = lavaanOptions, :
lavaan WARNING: could not compute standard errors!
But since you only have two groups, there is no need to use labels. We
just need to 'free' the mean of 'FR' in the second group, right? What
about this:
MyModel<-'
Inhibit =~ I1 + I2 + I3
Update =~ U1 + U2 + U3
Switch =~ S1 + S2 + S3
FR =~ FR1 + FR2 + FR3 + FR4
Inhibit ~ c(0,0)*1
Update ~ c(0,0)*1
Switch ~ c(0,0)*1
FR ~ c(0, NA)*1'
fit <- cfa (MyModel, data=data, missing = "ML", group="FRcorrect4",
group.equal=c("loadings", "intercepts"))
Yves.
anova(scalarinva, fitEqualLV1)
anova(equalmeans, fitEqualLV1)