Hi, I am recently running a one-factor MG-CFA using categorical data:
model<-"
X=~x1+x2+x3+x4+x5
"
fit1<-sem(model,data=data,
ordered = c("x1","x2","x3","x4","x5"),
parameterization="delta",
meanstructure = TRUE,
group = "sex")
fit2<-sem(model,data=data,
ordered = c("x1","x2","x3","x4","x5"),
parameterization="theta",
meanstructure = TRUE,
group = "sex")
There are two problems regarding the output:
1. As definition, delta parameterization should be adding constraints on residual variances of y* = 1, and theta parameterization should be adding constraints on variances of y* = 1. While in the output, I found the opposite results:
Delta output:
> summary(fit1,fit.measure=T,rsquare=T,standardized=T,remove.unused = FALSE)
lavaan 0.6-19 ended normally after 18 iterations
Estimator DWLS
Optimization method NLMINB
Number of model parameters 30
Number of observations per group:
2 383
1 120
Model Test User Model:
Standard Scaled
Test Statistic 31.547 60.225
Degrees of freedom 10 10
P-value (Chi-square) 0.000 0.000
Scaling correction factor 0.535
Shift parameter 1.268
simple second-order correction
Test statistic for each group:
2 56.964 56.964
1 3.261 3.261
Model Test Baseline Model:
Test statistic 10980.380 6708.694
Degrees of freedom 20 20
P-value 0.000 0.000
Scaling correction factor 1.639
User Model versus Baseline Model:
Comparative Fit Index (CFI) 0.998 0.992
Tucker-Lewis Index (TLI) 0.996 0.985
Robust Comparative Fit Index (CFI) 0.938
Robust Tucker-Lewis Index (TLI) 0.875
Root Mean Square Error of Approximation:
RMSEA 0.093 0.142
90 Percent confidence interval - lower 0.057 0.108
90 Percent confidence interval - upper 0.130 0.177
P-value H_0: RMSEA <= 0.050 0.026 0.000
P-value H_0: RMSEA >= 0.080 0.747 0.998
Robust RMSEA 0.247
90 Percent confidence interval - lower 0.187
90 Percent confidence interval - upper 0.311
P-value H_0: Robust RMSEA <= 0.050 0.000
P-value H_0: Robust RMSEA >= 0.080 1.000
Standardized Root Mean Square Residual:
SRMR 0.039 0.039
Parameter Estimates:
Parameterization Delta
Standard errors Robust.sem
Information Expected
Information saturated (h1) model Unstructured
Group 1 [2]:
Latent Variables:
Estimate Std.Err z-value P(>|z|) Std.lv Std.all
X =~
x1 1.000 0.912 0.912
x2 0.969 0.024 40.681 0.000 0.884 0.884
x3 0.831 0.035 23.875 0.000 0.758 0.758
x4 0.977 0.024 41.401 0.000 0.891 0.891
x5 1.057 0.026 41.010 0.000 0.964 0.964
Intercepts:
Estimate Std.Err z-value P(>|z|) Std.lv Std.all
.x1 0.000 0.000 0.000
.x2 0.000 0.000 0.000
.x3 0.000 0.000 0.000
.x4 0.000 0.000 0.000
.x5 0.000 0.000 0.000
X 0.000 0.000 0.000
Thresholds:
Estimate Std.Err z-value P(>|z|) Std.lv Std.all
x1|t1 -1.215 0.085 -14.337 0.000 -1.215 -1.215
x1|t2 -0.141 0.064 -2.192 0.028 -0.141 -0.141
x2|t1 -0.766 0.071 -10.709 0.000 -0.766 -0.766
x2|t2 0.214 0.065 3.312 0.001 0.214 0.214
x3|t1 -1.030 0.078 -13.172 0.000 -1.030 -1.030
x3|t2 -0.010 0.064 -0.153 0.878 -0.010 -0.010
x4|t1 -1.112 0.081 -13.744 0.000 -1.112 -1.112
x4|t2 0.043 0.064 0.663 0.507 0.043 0.043
x5|t1 -1.174 0.083 -14.124 0.000 -1.174 -1.174
x5|t2 -0.181 0.065 -2.803 0.005 -0.181 -0.181
Variances:
Estimate Std.Err z-value P(>|z|) Std.lv Std.all
.x1 0.168 0.168 0.168
.x2 0.219 0.219 0.219
.x3 0.426 0.426 0.426
.x4 0.205 0.205 0.205
.x5 0.070 0.070 0.070
X 0.832 0.030 27.583 0.000 1.000 1.000
Scales y*:
Estimate Std.Err z-value P(>|z|) Std.lv Std.all
x1 1.000 1.000 1.000
x2 1.000 1.000 1.000
x3 1.000 1.000 1.000
x4 1.000 1.000 1.000
x5 1.000 1.000 1.000
R-Square:
Estimate
x1 0.832
x2 0.781
x3 0.574
x4 0.795
x5 0.930
Group 2 [1]:
Latent Variables:
Estimate Std.Err z-value P(>|z|) Std.lv Std.all
X =~
x1 1.000 0.894 0.894
x2 0.928 0.044 21.073 0.000 0.829 0.829
x3 0.894 0.048 18.635 0.000 0.799 0.799
x4 0.976 0.044 22.046 0.000 0.872 0.872
x5 0.988 0.048 20.441 0.000 0.883 0.883
Intercepts:
Estimate Std.Err z-value P(>|z|) Std.lv Std.all
.x1 0.000 0.000 0.000
.x2 0.000 0.000 0.000
.x3 0.000 0.000 0.000
.x4 0.000 0.000 0.000
.x5 0.000 0.000 0.000
X 0.000 0.000 0.000
Thresholds:
Estimate Std.Err z-value P(>|z|) Std.lv Std.all
x1|t1 -1.036 0.140 -7.399 0.000 -1.036 -1.036
x1|t2 0.275 0.116 2.366 0.018 0.275 0.275
x2|t1 -0.275 0.116 -2.366 0.018 -0.275 -0.275
x2|t2 0.728 0.126 5.759 0.000 0.728 0.728
x3|t1 -0.363 0.117 -3.091 0.002 -0.363 -0.363
x3|t2 0.623 0.123 5.060 0.000 0.623 0.623
x4|t1 -0.812 0.129 -6.272 0.000 -0.812 -0.812
x4|t2 0.385 0.118 3.271 0.001 0.385 0.385
x5|t1 -0.755 0.127 -5.931 0.000 -0.755 -0.755
x5|t2 0.297 0.116 2.547 0.011 0.297 0.297
Variances:
Estimate Std.Err z-value P(>|z|) Std.lv Std.all
.x1 0.201 0.201 0.201
.x2 0.312 0.312 0.312
.x3 0.362 0.362 0.362
.x4 0.239 0.239 0.239
.x5 0.220 0.220 0.220
X 0.799 0.053 15.186 0.000 1.000 1.000
Scales y*:
Estimate Std.Err z-value P(>|z|) Std.lv Std.all
x1 1.000 1.000 1.000
x2 1.000 1.000 1.000
x3 1.000 1.000 1.000
x4 1.000 1.000 1.000
x5 1.000 1.000 1.000
R-Square:
Estimate
x1 0.799
x2 0.688
x3 0.638
x4 0.761
x5 0.780
Theta output:
>
> summary(fit2,fit.measure=T,rsquare=T,standardized=T,remove.unused = FALSE)
lavaan 0.6-19 ended normally after 165 iterations
Estimator DWLS
Optimization method NLMINB
Number of model parameters 30
Number of observations per group:
2 383
1 120
Model Test User Model:
Standard Scaled
Test Statistic 31.547 60.225
Degrees of freedom 10 10
P-value (Chi-square) 0.000 0.000
Scaling correction factor 0.535
Shift parameter 1.268
simple second-order correction
Test statistic for each group:
2 56.964 56.964
1 3.261 3.261
Model Test Baseline Model:
Test statistic 10980.380 6708.694
Degrees of freedom 20 20
P-value 0.000 0.000
Scaling correction factor 1.639
User Model versus Baseline Model:
Comparative Fit Index (CFI) 0.998 0.992
Tucker-Lewis Index (TLI) 0.996 0.985
Robust Comparative Fit Index (CFI) 0.938
Robust Tucker-Lewis Index (TLI) 0.875
Root Mean Square Error of Approximation:
RMSEA 0.093 0.142
90 Percent confidence interval - lower 0.057 0.108
90 Percent confidence interval - upper 0.130 0.177
P-value H_0: RMSEA <= 0.050 0.026 0.000
P-value H_0: RMSEA >= 0.080 0.747 0.998
Robust RMSEA 0.247
90 Percent confidence interval - lower 0.187
90 Percent confidence interval - upper 0.311
P-value H_0: Robust RMSEA <= 0.050 0.000
P-value H_0: Robust RMSEA >= 0.080 1.000
Standardized Root Mean Square Residual:
SRMR 0.039 0.039
Parameter Estimates:
Parameterization Theta
Standard errors Robust.sem
Information Expected
Information saturated (h1) model Unstructured
Group 1 [2]:
Latent Variables:
Estimate Std.Err z-value P(>|z|) Std.lv Std.all
X =~
x1 1.000 2.228 0.912
x2 0.848 0.109 7.797 0.000 1.889 0.884
x3 0.521 0.071 7.319 0.000 1.161 0.758
x4 0.883 0.115 7.700 0.000 1.967 0.891
x5 1.631 0.369 4.421 0.000 3.632 0.964
Intercepts:
Estimate Std.Err z-value P(>|z|) Std.lv Std.all
.x1 0.000 0.000 0.000
.x2 0.000 0.000 0.000
.x3 0.000 0.000 0.000
.x4 0.000 0.000 0.000
.x5 0.000 0.000 0.000
X 0.000 0.000 0.000
Thresholds:
Estimate Std.Err z-value P(>|z|) Std.lv Std.all
x1|t1 -2.966 0.282 -10.511 0.000 -2.966 -1.215
x1|t2 -0.345 0.163 -2.116 0.034 -0.345 -0.141
x2|t1 -1.637 0.166 -9.849 0.000 -1.637 -0.766
x2|t2 0.458 0.138 3.325 0.001 0.458 0.214
x3|t1 -1.579 0.125 -12.678 0.000 -1.579 -1.030
x3|t2 -0.015 0.098 -0.153 0.879 -0.015 -0.010
x4|t1 -2.453 0.225 -10.880 0.000 -2.453 -1.112
x4|t2 0.094 0.141 0.665 0.506 0.094 0.043
x5|t1 -4.425 0.700 -6.318 0.000 -4.425 -1.174
x5|t2 -0.682 0.273 -2.494 0.013 -0.682 -0.181
Variances:
Estimate Std.Err z-value P(>|z|) Std.lv Std.all
.x1 1.000 1.000 0.168
.x2 1.000 1.000 0.219
.x3 1.000 1.000 0.426
.x4 1.000 1.000 0.205
.x5 1.000 1.000 0.070
X 4.962 1.073 4.626 0.000 1.000 1.000
Scales y*:
Estimate Std.Err z-value P(>|z|) Std.lv Std.all
x1 0.410 0.410 1.000
x2 0.468 0.468 1.000
x3 0.653 0.653 1.000
x4 0.453 0.453 1.000
x5 0.265 0.265 1.000
R-Square:
Estimate
x1 0.832
x2 0.781
x3 0.574
x4 0.795
x5 0.930
Group 2 [1]:
Latent Variables:
Estimate Std.Err z-value P(>|z|) Std.lv Std.all
X =~
x1 1.000 1.992 0.894
x2 0.746 0.137 5.432 0.000 1.485 0.829
x3 0.666 0.124 5.355 0.000 1.327 0.799
x4 0.895 0.183 4.880 0.000 1.783 0.872
x5 0.946 0.219 4.325 0.000 1.884 0.883
Intercepts:
Estimate Std.Err z-value P(>|z|) Std.lv Std.all
.x1 0.000 0.000 0.000
.x2 0.000 0.000 0.000
.x3 0.000 0.000 0.000
.x4 0.000 0.000 0.000
.x5 0.000 0.000 0.000
X 0.000 0.000 0.000
Thresholds:
Estimate Std.Err z-value P(>|z|) Std.lv Std.all
x1|t1 -2.310 0.362 -6.384 0.000 -2.310 -1.036
x1|t2 0.613 0.254 2.410 0.016 0.613 0.275
x2|t1 -0.492 0.206 -2.391 0.017 -0.492 -0.275
x2|t2 1.303 0.222 5.876 0.000 1.303 0.728
x3|t1 -0.603 0.192 -3.148 0.002 -0.603 -0.363
x3|t2 1.035 0.199 5.214 0.000 1.035 0.623
x4|t1 -1.661 0.301 -5.518 0.000 -1.661 -0.812
x4|t2 0.788 0.236 3.338 0.001 0.788 0.385
x5|t1 -1.611 0.309 -5.207 0.000 -1.611 -0.755
x5|t2 0.633 0.244 2.591 0.010 0.633 0.297
Variances:
Estimate Std.Err z-value P(>|z|) Std.lv Std.all
.x1 1.000 1.000 0.201
.x2 1.000 1.000 0.312
.x3 1.000 1.000 0.362
.x4 1.000 1.000 0.239
.x5 1.000 1.000 0.220
X 3.967 1.298 3.057 0.002 1.000 1.000
Scales y*:
Estimate Std.Err z-value P(>|z|) Std.lv Std.all
x1 0.449 0.449 1.000
x2 0.559 0.559 1.000
x3 0.602 0.602 1.000
x4 0.489 0.489 1.000
x5 0.469 0.469 1.000
R-Square:
Estimate
x1 0.799
x2 0.688
x3 0.638
x4 0.761
x5 0.780
I would like to ask if it is my misunderstanding or output reading problem. It would be grateful if any clarifications could be made.
2. I would also like to ask how can I output the estimate the intercepts of the latent continuous variable X as well as observed variables x1 to x5, as I have already over-ridden int.ov.free and int.lv.free by using meanstructure=T. Or is it not possible with underlying y* assumptions?
Thank you very much!
Tony