Unspecified model in measurement invariance

105 views
Skip to first unread message

NESTOR MONTORO PEREZ

unread,
Apr 16, 2024, 1:34:15 PM4/16/24
to lavaan
Good morning,

After testing a model in CFA (Mod.6) which I copy below, it gives me a marginal adjustment, but the model is well specified without negative variances and without values more than 1. I present a model after an EFA (in a different split sample) (Mod.1) which in the measurement invariance (EFA sample + CFA sample) is correctly specified. Model 6 is a theoretical model. This model consists of a pain factor, a hyperreactivity factor (with two factors and corresponding items) and a hyperreactivity factor (with three factors and corresponding items). I have tested a second-order model to see if a single instrument score can be used, the ouput of r is OK. However, when I want to perform a measurement invariance according to the sex of Mod.6 in the total sample, I get a warning in r that the model is not well specified. What could be happening, can someone help me?

Thanks in advance

Néstor Montoro-Pérez
Alicante University

> Mod.1<-"F1=~ I39+I43+I44+I45+I46 + F2=~ I42+I47+I48+I49 + F3=~ I2+I3+I4+I5+I7 + F4=~ I35+I36+I37+I38 + F5=~ I18+I19+I20 + F6=~ I22+I24" > Modelo_1 <- cfa(Mod.1, data = BASE, estimator = "WLSMV", ordered=T) > summary(Modelo_1, fit.measures = T, standardized=T) lavaan 0.6.17 ended normally after 54 iterations Estimator DWLS Optimization method NLMINB Number of model parameters 107 Number of observations 603 Model Test User Model: Standard Scaled Test Statistic 304.767 398.779 Degrees of freedom 215 215 P-value (Chi-square) 0.000 0.000 Scaling correction factor 0.903 Shift parameter 61.389 simple second-order correction Model Test Baseline Model: Test statistic 11569.461 5784.798 Degrees of freedom 253 253 P-value 0.000 0.000 Scaling correction factor 2.046 User Model versus Baseline Model: Comparative Fit Index (CFI) 0.992 0.967 Tucker-Lewis Index (TLI) 0.991 0.961 Robust Comparative Fit Index (CFI) 0.916 Robust Tucker-Lewis Index (TLI) 0.902 Root Mean Square Error of Approximation: RMSEA 0.026 0.038 90 Percent confidence interval - lower 0.019 0.032 90 Percent confidence interval - upper 0.033 0.043 P-value H_0: RMSEA <= 0.050 1.000 1.000 P-value H_0: RMSEA >= 0.080 0.000 0.000 Robust RMSEA 0.056 90 Percent confidence interval - lower 0.048 90 Percent confidence interval - upper 0.063 P-value H_0: Robust RMSEA <= 0.050 0.108 P-value H_0: Robust RMSEA >= 0.080 0.000 Standardized Root Mean Square Residual: SRMR 0.047 0.047 Parameter Estimates: Parameterization Delta Standard errors Robust.sem Information Expected Information saturated (h1) model Unstructured Latent Variables: Estimate Std.Err z-value P(>|z|) Std.lv Std.all F1 =~ I39 1.000 0.638 0.638 I43 1.131 0.083 13.655 0.000 0.721 0.721 I44 1.079 0.079 13.735 0.000 0.688 0.688 I45 0.965 0.075 12.829 0.000 0.615 0.615 I46 0.992 0.080 12.473 0.000 0.632 0.632 F2 =~ I42 1.000 0.645 0.645 I47 1.170 0.086 13.668 0.000 0.755 0.755 I48 1.251 0.082 15.244 0.000 0.807 0.807 I49 1.018 0.079 12.905 0.000 0.657 0.657 F3 =~ I2 1.000 0.738 0.738 I3 0.908 0.065 13.920 0.000 0.670 0.670 I4 1.008 0.067 15.112 0.000 0.744 0.744 I5 0.723 0.071 10.152 0.000 0.534 0.534 I7 0.842 0.065 12.898 0.000 0.621 0.621 F4 =~ I35 1.000 0.655 0.655 I36 1.077 0.076 14.102 0.000 0.705 0.705 I37 1.020 0.075 13.643 0.000 0.668 0.668 I38 0.985 0.071 13.927 0.000 0.645 0.645 F5 =~ I18 1.000 0.680 0.680 I19 0.810 0.088 9.214 0.000 0.550 0.550 I20 1.083 0.092 11.731 0.000 0.737 0.737 F6 =~ I22 1.000 0.687 0.687 I24 1.293 0.145 8.898 0.000 0.888 0.888

> Mod.6<- "F1=~ I39+I43+I44+I45+I46 + F2=~ I42+I47+I48+I49 + F3=~ I2+I3+I4+I5+I7 + F4=~ I35+I36+I37+I38 + F5=~ I18+I19+I20 + F6=~ I22+I24 + Hypo =~ F5+F6 + Hypr =~ F1+F2+F4 + Tot=~F3+Hypo+Hypr" > Modelo_6<- cfa(Mod.6, data=BASE, estimator ="WLSMV", ordered=T) > summary(Modelo_6, fit.measures = T, standardized=T) lavaan 0.6.17 ended normally after 42 iterations Estimator DWLS Optimization method NLMINB Number of model parameters 100 Number of observations 603 Model Test User Model: Standard Scaled Test Statistic 354.675 429.165 Degrees of freedom 222 222 P-value (Chi-square) 0.000 0.000 Scaling correction factor 0.981 Shift parameter 67.605 simple second-order correction Model Test Baseline Model: Test statistic 11569.461 5784.798 Degrees of freedom 253 253 P-value 0.000 0.000 Scaling correction factor 2.046 User Model versus Baseline Model: Comparative Fit Index (CFI) 0.988 0.963 Tucker-Lewis Index (TLI) 0.987 0.957 Robust Comparative Fit Index (CFI) 0.911 Robust Tucker-Lewis Index (TLI) 0.899 Root Mean Square Error of Approximation: RMSEA 0.031 0.039 90 Percent confidence interval - lower 0.025 0.034 90 Percent confidence interval - upper 0.037 0.045 P-value H_0: RMSEA <= 0.050 1.000 0.999 P-value H_0: RMSEA >= 0.080 0.000 0.000 Robust RMSEA 0.057 90 Percent confidence interval - lower 0.049 90 Percent confidence interval - upper 0.064 P-value H_0: Robust RMSEA <= 0.050 0.074 P-value H_0: Robust RMSEA >= 0.080 0.000 Standardized Root Mean Square Residual: SRMR 0.051 0.051 Parameter Estimates: Parameterization Delta Standard errors Robust.sem Information Expected Information saturated (h1) model Unstructured Latent Variables: Estimate Std.Err z-value P(>|z|) Std.lv Std.all F1 =~ I39 1.000 0.635 0.635 I43 1.137 0.085 13.448 0.000 0.721 0.721 I44 1.084 0.080 13.515 0.000 0.688 0.688 I45 0.970 0.077 12.665 0.000 0.616 0.616 I46 0.999 0.081 12.282 0.000 0.634 0.634 F2 =~ I42 1.000 0.650 0.650 I47 1.160 0.084 13.727 0.000 0.753 0.753 I48 1.241 0.081 15.344 0.000 0.806 0.806 I49 1.010 0.078 12.935 0.000 0.656 0.656 F3 =~ I2 1.000 0.739 0.739 I3 0.911 0.066 13.904 0.000 0.673 0.673 I4 1.007 0.067 15.001 0.000 0.744 0.744 I5 0.724 0.071 10.149 0.000 0.534 0.534 I7 0.836 0.066 12.755 0.000 0.618 0.618 F4 =~ I35 1.000 0.655 0.655 I36 1.081 0.077 14.096 0.000 0.708 0.708 I37 1.016 0.075 13.547 0.000 0.665 0.665 I38 0.985 0.071 13.887 0.000 0.645 0.645 F5 =~ I18 1.000 0.678 0.678 I19 0.814 0.089 9.185 0.000 0.552 0.552 I20 1.086 0.093 11.646 0.000 0.736 0.736 F6 =~ I22 1.000 0.682 0.682 I24 1.311 0.151 8.681 0.000 0.894 0.894 Hypo =~ F5 1.000 0.785 0.785 F6 0.902 0.130 6.956 0.000 0.705 0.705 Hypr =~ F1 1.000 0.817 0.817 F2 0.867 0.090 9.611 0.000 0.691 0.691 F4 1.064 0.105 10.132 0.000 0.842 0.842 Tot =~ F3 1.000 0.553 0.553 Hypo 1.215 0.159 7.656 0.000 0.932 0.932 Hypr 1.160 0.160 7.247 0.000 0.915 0.915


> #Definir la variable como categórica. > BASE$SEXO <- as.factor(BASE$SEXO) > Mod.6 <-"F1=~ I39+I43+I44+I45+I46 + F2=~ I42+I47+I48+I49 + F3=~ I2+I3+I4+I5+I7 + F4=~ I35+I36+I37+I38 + F5=~ I18+I19+I20 + F6=~ I22+I24 + Hypo =~ F5+F6 + Hypr =~ F1+F2+F4 + Tot=~F3+Hypo+Hypr" > inv.sex.conf <- measEq.syntax(configural.model = Mod.6,estimator="WLSMV", ID.fac = "std.lv", parameterization = "theta", group = "SEXO", orthogonal=FALSE, data=BASE, + ID.cat = "Wu.Estabrook.2016",return.fit=TRUE, group.equal = c("thresholds"), ordered = T) Higher-order factors detected. ID.fac set to "ul". Warning message: 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 (= 1.581756e-15) is close to zero. This may be a symptom that the model is not identified.

NESTOR MONTORO PEREZ

unread,
Apr 16, 2024, 1:44:46 PM4/16/24
to lavaan
I attach a document of r's output in word format, as it is not visually appealing when copied to the group.

Thank you in advance!
Models Invariance.docx

Yago Luksevicius de Moraes

unread,
Apr 17, 2024, 3:57:56 PM4/17/24
to lavaan
Hi, Néstor.

As the message indicates, the real problem is that a covariance matrix is not positive-definite.
One common reason is that the model is not identified, but there may be other ones, like small sample size or high number of missing data.

Remember that in Mod.1 and Mod.6, a single matrix is constructed based on the whole sample. When testing invariance, one matrix is constructed for each group. Thus, I recommend you to check the sexes separately to see which one is causing the error.

Best regards,
Yago

Reply all
Reply to author
Forward
0 new messages