I've been stuck on this assignment for days. Can someone please help me understand what I'm doing wrong? I've included a picture of the path diagram and labels for each step to make my thought process clear. I'm new to SEM and the model would be the presented here.
First, I conducted the multiple group assessment:
mod.mg1a = "
#Variances
crit ~~ crit
warm ~~ warm
trust ~~ trust
never ~~ never
moral ~~ moral
han ~~ han
good ~~ good
#Regression/Causal Path
trust ~ warm
trust ~ crit
#Factor Loadings
trust =~ never + moral + han + good
"
fit.mg1a = lavaan(mod.mg1a,data=mach,group="gen")
summary(fit.mg1a)
mod.mg1b = "
#Variances
crit ~~ crit
warm ~~ warm
trust ~~ trust
never ~~ never
moral ~~ moral
han ~~ han
good ~~ good
#Regression/Causal Path
trust ~ warm
trust ~ crit
#Factor Loadings
trust =~ never + moral + han + good
"
fit.mg1b = lavaan(mod.mg1b,data=mach,group="gen")
summary(fit.mg1b)
anova(fit.mg1a, fit.mg1b)
This return the following warnings:
***Warning in lav_partable_check(lavpartable, categorical = lavoptions$categorical, : lavaan WARNING: automatically added intercepts are set to zero: [warm crit warm crit] Warning in lav_model_vcov(lavmodel = lavmodel, lavsamplestats = lavsamplestats, : lavaan WARNING: Could not compute standard errors! The information matrix could not be inverted. This may be a symptom that the model is not identified.*** ---------- ***Warning in lavTestLRT(object = object, ..., model.names = NAMES) : lavaan WARNING: some models have the same degrees of freedom***
The following assess the comparison with the model with all parameters constrained to be equal:
fit.con = lavaan(mod.mg1a,data=mach, group="gen", group.equal=c(
"loadings","lv.covariances","intercepts","means","residuals",
"lv.variances","regressions"))
which returns:
***Warning in lav_partable_check(lavpartable, categorical = lavoptions$categorical, : lavaan WARNING: automatically added intercepts are set to zero: [warm crit warm crit] Warning in lav_model_vcov(lavmodel = lavmodel, lavsamplestats = lavsamplestats, : lavaan WARNING: The variance-covariance matrix of the estimated parameters (vcov) does not appear to be positive definite! The smallest eigenvalue (= 7.438519e-15) is close to zero. This may be a symptom that the model is not identified.***
Grateful for any guidance.