Hello,
I am estimating the latent correlation between two measurement models on multiple imputed datasets: one with a two-factor model ("pos" and "neg") and another with only one factor. I am ultimately interested in the pos-swl and neg-swl factor correlations. As displayed below, I am using cfa.mi() to accomplish this:
sc.swl.1 <- '#specifying measurement model portion
pos =~ NA*SCS_SF_q2 + SCS_SF_q5 + SCS_SF_q10 + SCS_SF_q3 + SCS_SF_q7
neg =~ NA*SCS_SF_q11 + SCS_SF_q4 + SCS_SF_q8 + SCS_SF_q1 + SCS_SF_q9
pos ~~ 1*pos
neg ~~ 1*neg
swl =~ NA*SWLS_q1 + SWLS_q2 + SWLS_q3 + SWLS_q4 + SWLS_q5
swl ~~ 1*swl
#specifying structural model portion
pos ~~ swl
neg ~~ swl'
sc.swl.1.out = sem.mi(sc.swl.1, data=imp2final, ordered=c("SCS_SF_q1", "SCS_SF_q2", "SCS_SF_q3", "SCS_SF_q4", "SCS_SF_q5", "SCS_SF_q7", "SCS_SF_q8", "SCS_SF_q9", "SCS_SF_q10", "SCS_SF_q11", "SWLS_q1", "SWLS_q2", "SWLS_q3", "SWLS_q4", "SWLS_q5"), estimator = "WLSMV", std.lv = TRUE)
summary(sc.swl.1.out, standardized = TRUE, rsquare=TRUE, fit.measures = TRUE)
The output indicates it ran fine with no accompanying warnings:
> summary(sc.swl.1.out, standardized = TRUE, rsquare=TRUE, fit.measures = TRUE)
lavaan.mi object fit to 20 imputed data sets using:
- lavaan (0.6-19)
- lavaan.mi (0.1-0)
See class?lavaan.mi help page for available methods.
Convergence information:
The model converged on 20 imputed data sets.
Standard errors were available for all imputations.
Estimator DWLS
Optimization method NLMINB
Number of model parameters 88
Number of observations 170
But, when I consult my correlation residual and standardized residual matrices with lavResiduals.mi(), I get 22 warning messages saying this repeatedly:
There were 22 warnings (use warnings() to see them)
> warnings()
Warning messages:
1: lavaan->lav_model_vcov():
The variance-covariance matrix of the estimated parameters (vcov) does not appear to be positive definite! The smallest eigenvalue (= -2.644786e-18) is smaller than zero. This may be a symptom that the model is not identified.
I am wondering about the seeming disconnect between the okay output from lavaan.mi() with no indication of NPD and the nature of the warning messages popping up when lavResiduals.mi()is called. Want to make sure I'm not missing a major red flag with the model.
Thanks,
Bryan