Dear list,
I have a follow up question when I compare output between configural and weak invariance model from lavaan and semTools. Could you give me some advice please? Thank you very much.
I found that the chi square for the weak invariance model in lavaan is smaller than that for the configural invariance model, which should not be. The df are fine in configural, weak, and strong invariance model using lavaan, semTools, and Mplus. I have compared the parameter estimates between configural and weak invariance model from lavaan output, the only difference I can locate is in the factor loadings part, that they were not equal in the configural invariance model but were constrained to be equal across groups in the weak invariance model. So my question is: did I miss anything in the lavaan model specification? Please find the lavaan and semTools code below:
mod="
#measurement model
bul1=~bul1_1+bul2_1+bul3_1+bul4_1+bul5_1+bul6_1
bul2=~bul1_2+bul2_2+bul3_2+bul4_2+bul5_2+bul6_2
bul3=~bul1_3+bul2_3+bul3_3+bul4_3+bul5_3+bul6_3
"
#configural invariance model:
> fitconfiginvar=sem(mod,data=grades1to9,missing="pairwise",group="Boy",
+ ordered=c("bul1_1","bul2_1","bul3_1","bul4_1","bul5_1","bul6_1",
+ "bul1_2","bul2_2","bul3_2","bul4_2","bul5_2","bul6_2",
+ "bul1_3","bul2_3","bul3_3","bul4_3","bul5_3","bul6_3")
+ )
There were 50 or more warnings (use warnings() to see the first 50)
> summary(fitconfiginvar,fit.measures=T,standardized=T)
lavaan (0.5-17) converged normally after 64 iterations
Used Total
Number of observations per group
0 15666 17627
1 15395 18007
Estimator DWLS Robust
Minimum Function Test Statistic 2443.052 3153.321
Degrees of freedom 264 264
P-value (Chi-square) 0.000 0.000
Scaling correction factor 0.795
Shift parameter for each group:
0 41.258
1 40.544
for simple second-order correction (Mplus variant)
Chi-square for each group:
0 1292.929 1666.788
1 1150.123 1486.532
Model test baseline model:
Minimum Function Test Statistic 227098.254 87151.952
Degrees of freedom 306 306
P-value 0.000 0.000
User model versus baseline model:
Comparative Fit Index (CFI) 0.990 0.967
Tucker-Lewis Index (TLI) 0.989 0.961
Root Mean Square Error of Approximation:
RMSEA 0.023 0.027
90 Percent Confidence Interval 0.022 0.024 0.026 0.027
P-value RMSEA <= 0.05 1.000 1.000
Weighted Root Mean Square Residual:
WRMR 3.295 3.295
Parameter estimates:
Information Expected
Standard Errors Robust.sem
# weak invariance model:
> fitweakinvar=sem(mod,data=grades1to9,missing="pairwise",group="Boy",group.equal=c("loadings"),
+ ordered=c("bul1_1","bul2_1","bul3_1","bul4_1","bul5_1","bul6_1",
+ "bul1_2","bul2_2","bul3_2","bul4_2","bul5_2","bul6_2",
+ "bul1_3","bul2_3","bul3_3","bul4_3","bul5_3","bul6_3")
+ )
There were 50 or more warnings (use warnings() to see the first 50)
> summary(fitweakinvar,fit.measures=T,standardized=T)
lavaan (0.5-17) converged normally after 31 iterations
Used Total
Number of observations per group
0 15666 17627
1 15395 18007
Estimator DWLS Robust
Minimum Function Test Statistic 2576.839 2668.714
Degrees of freedom 279 279
P-value (Chi-square) 0.000 0.000
Scaling correction factor 1.004
Shift parameter for each group:
0 51.777
1 50.881
for simple second-order correction (Mplus variant)
Chi-square for each group:
0 1402.735 1448.642
1 1174.104 1220.072
Model test baseline model:
Minimum Function Test Statistic 227098.254 87151.952
Degrees of freedom 306 306
P-value 0.000 0.000
User model versus baseline model:
Comparative Fit Index (CFI) 0.990 0.972
Tucker-Lewis Index (TLI) 0.989 0.970
Root Mean Square Error of Approximation:
RMSEA 0.023 0.023
90 Percent Confidence Interval 0.022 0.024 0.023 0.024
P-value RMSEA <= 0.05 1.000 1.000
Weighted Root Mean Square Residual:
WRMR 3.384 3.384
Parameter estimates:
Information Expected
Standard Errors Robust.sem
# measurementInvarianceCat() in semTools package
> measureInvar=measurementInvarianceCat(mod,data=grades1to9,missing="pairwise",group="Boy",strict=T,
+ ordered=c("bul1_1","bul2_1","bul3_1","bul4_1","bul5_1","bul6_1",
+ "bul1_2","bul2_2","bul3_2","bul4_2","bul5_2","bul6_2",
+ "bul1_3","bul2_3","bul3_3","bul4_3","bul5_3","bul6_3")
+ )
#################### Measurement invariance tests ####################
#################### Model 1: configural invariance:
chisq.scaled df pvalue cfi.scaled rmsea.scaled bic
3153.322 264.000 0.000 0.967 0.027 NA
#################### Model 2: weak invariance (equal loadings):
chisq.scaled df pvalue cfi.scaled rmsea.scaled bic
3463.783 279.000 0.000 0.963 0.027 NA
[Model 1 versus model 2]
delta.chisq delta.df delta.p.value delta.cfi delta.cfi.scaled
422.004 15.000 0.000 0.003 0.003
#################### Model 3: strong invariance (equal loadings + thresholds):
chisq.scaled df pvalue cfi.scaled rmsea.scaled bic
3489.870 330.000 0.000 0.964 0.025 NA
[Model 1 versus model 3]
delta.chisq delta.df delta.p.value delta.cfi delta.cfi.scaled
1107.766 66.000 0.000 0.004 0.003
[Model 2 versus model 3]
delta.chisq delta.df delta.p.value delta.cfi delta.cfi.scaled
466.498 51.000 0.000 0.001 0.000
ya