Dear list,
I am trying to add phantom variables to the weak invariance model with categorical indicators. With or without phantom variables, the models worked fine, however, the model with phantom variables had 6 more df. Could you give me some suggestions on what I missed please? Thank you very much. Please see my code below:
Without phatom variables:
crossmod="
#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
"
fitweakinvar=sem(crossmod,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")
)
summary(fitweakinvar,fit.measures=T,standardized=T)
lavaan (0.5-18) converged normally after 32 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)
With phantom variables:
> crossmodphan="#when latent var is not equal across groups
+ #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
+ #structure model
+ bul1ph=~bul1;bul2ph=~bul2;bul3ph=~bul3;
+ bul1~~0*bul1;bul2~~0*bul2;bul3~~0*bul3;
+ bul1ph~~1*bul1ph;bul2ph~~1*bul2ph;bul3ph~~1*bul3ph;
+ bul1~~0*bul2;bul1~~0*bul3;bul2~~0*bul3;
+ bul1~~0*bul1ph;bul1~~0*bul2ph;bul1~~0*bul3ph;bul2~~0*bul1ph;bul2~~0*bul2ph;bul2~~0*bul3ph;bul3~~0*bul1ph;bul3~~0*bul2ph;bul3~~0*bul3ph;
+ bul1ph~~bul2ph;bul1ph~~bul3ph;bul2ph~~bul3ph;
+ bul1~0*1;bul2~0*1;bul3~0*1;bul1ph~0*1;bul2ph~0*1;bul3ph~0*1;
+ "
> fitlatentcovinvarphan=sem(crossmodphan,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")
+ )
lavaan (0.5-18) converged normally after 14 iterations
Used Total
Number of observations per group
0 15666 17627
1 15395 18007
Estimator DWLS Robust
Minimum Function Test Statistic 7701.290 5856.872
Degrees of freedom 285 285
P-value (Chi-square) 0.000 0.000
Scaling correction factor 1.345
Shift parameter for each group:
0 66.157
1 65.013
for simple second-order correction (Mplus variant)