Ok, first sorry If I sound dumb, I am new at this.
I am trying to run a measurement invariance test with 2 groups in a CFA. I have 2 Factors NV and VO. Whenever, I try to fit the model with 2 groups, I get the following error "lavaan ERROR: initial model-implied matrix (Sigma) is not positive definite; check your model and/or starting parameters in group 2."
I have no idea what this means. Here is my code (I correlated all of the residual covariances based on MI, I tried running it without these and encountered the same error):
MITcon_SRO_W3 <-'
NV =~ NA* NV1 + NV2 + NV3 + NV4 + NV5 + NV6 + NV7 + NV8 + NV9 + NV10 + NV11 + NV12 + NV13 + NV15 + NV16 + NV17 + NV18 + NV19 + NV20 + NV21
VO =~ NA * VO1 + VO2 + VO3 + VO4 + VO5 + VO6 + VO7 + VO8 + VO9 + VO10 + VO11
NV ~~ 1* NV
VO ~~ 1* VO
NV1 ~~ NV2 + NV3 + NV5 + NV6 + NV7 + NV10 + NV17 + NV18 + NV20 + VO2 + VO6
NV2 ~~ NV4 + NV5 + NV8 + NV12 + NV19 + NV21 + VO2 + VO3 + VO4
NV3 ~~ NV12 + NV13 + NV16 + NV19 + NV21 + VO1 + VO2 + VO3 + VO5 + VO8 + VO9
NV4 ~~ NV5 + NV7 + NV10 + NV11 + NV13 + NV16 + NV17 + NV19 + NV20 + VO3 + VO7 + VO10
NV5 ~~ NV10 + NV11 + VO4 + VO7
NV6 ~~ NV8 + NV10 + NV11 + NV12 + NV16 + NV19 + VO1 + VO2 + VO3 + VO8 + VO9
NV7 ~~ NV3 + NV10 + NV11 + NV12 + NV13 + NV17 + NV19 + NV20 + VO4 + VO8
NV10 ~~ NV8 + NV11 + NV12 + NV13 + NV15 + VO3 + VO4 + VO9 + VO10
NV11 ~~ NV13 + NV19 + VO3 + VO4 + VO7 + VO10
NV12 ~~ NV9 + NV15 + NV19 + NV20 + VO3 + VO5 + VO6
NV13 ~~ NV19 + NV16 + VO4 + VO5 + VO6 + VO7
NV15 ~~ NV21 + VO3 + VO4 + VO7 + VO8
NV16 ~~ NV17 + NV18 + NV20 + VO5 + VO7 + VO8
NV17 ~~ NV12 + NV18 + NV19 + NV20 + NV21 + VO3 + VO4 + VO7 + VO8 + VO 11
NV18 ~~ NV8 + NV12 + VO2 + VO3 + VO4 + VO7 + VO8
NV19 ~~ NV9 + NV21 + VO1 + VO6 + VO7 +VO8 + VO11
NV21 ~~ NV9 + NV20 + VO2 + VO4
VO1 ~~ NV16 + VO2 + VO4 + VO5 + VO6 + NV8 + VO10
VO2 ~~ NV8 + VO3 +VO6 + VO9
VO3 ~~ VO11
VO4 ~~ NV9 + VO7 + VO11
VO5 ~~ VO2 + VO6 + VO7 + VO10
VO7 ~~ VO3 + VO8 + VO11 + NV20
VO8 ~~ VO3 + VO4 + VO11
VO9 ~~ VO6 + VO10
VO10 ~~ VO2 + VO3 + VO6 + VO11'
fitMITcon_SRO_W3 <- cfa(MITcon_SRO_W3, data = ProjectData, missing = "fiml", group = "HI_Bi_B21")
summary(fitMITcon_SRO_W3,standardized=TRUE, fit.measures=TRUE)