Convergence problems in lavaan - measurement invariance categorical Data

1,749 views
Skip to first unread message

Philipp

unread,
Nov 16, 2016, 8:02:29 AM11/16/16
to lavaan

Hey,

I would like to test a modell for measurement invariance. my data is categorical. THe first check (weak invarinace) works well, but in the second check (strict invariance) the model has not converged. Therefore I dont get any fit indices etc.  Here you can see syntax and output:


Syntax:

Model_1="Items=~Item_1+Item_2+Item_3+Item_4+Item_5+Item_6+Item_7+Item_8+Item_9"

#                              #Check weak Invariance

sem.baseline<-sem(model=Model_1,data=data_MI, estimator="WLSMV", std.lv=TRUE, group="Gender",
                  ordered=c("Item_1","Item_2","Item_3","Item_4","Item_5","Item_6","Item_7","Item_8","Item_9"))
sum=summary(sem.baseline, standardized=TRUE, rsquare=TRUE, fit.measures=TRUE)

sem.loadings<-sem(model=Model_1,data=data_MI, estimator="WLSMV", std.lv=TRUE, group="Gender",
                  ordered=c("Item_1","Item_2","Item_3","Item_4","Item_5","Item_6","Item_7","Item_8","Item_9"),group.equal=c("loadings"))
sum=summary(sem.loadings, standardized=TRUE, rsquare=TRUE, fit.measures=TRUE)

anova(sem.baseline, sem.loadings)


#                 #Check strict invariance

sem.baseline_2<-sem(model=Model_1,data=data_MI, estimator="WLSMV", std.lv=TRUE, group="Gender",
                  ordered=c("Item_1","Item_2","Item_3","Item_4","Item_5","Item_6","Item_7","Item_8","Item_9"))
sum=summary(sem.baseline_2, standardized=TRUE, rsquare=TRUE, fit.measures=TRUE)

sem.load_thres_2<-sem(model=Model_1,data=data_MI, estimator="WLSMV", std.lv=TRUE, group="Gender",
                  ordered=c("Item_1","Item_2","Item_3","Item_4","Item_5","Item_6","Item_7","Item_8","Item_9"),group.equal=c("loadings","thresholds" ))
sum=summary(sem.load_thres_2, standardized=TRUE, rsquare=TRUE, fit.measures=TRUE)

anova(sem.baseline_2, sem.load_thres_2)

                                                   RESULTS


> Model_1="Items=~Item_1+Item_2+Item_3+Item_4+Item_5+Item_6+Item_7+Item_8+Item_9"
> #Check weak Invariance
> 
> 
> sem.baseline<-sem(model=Model_1,data=data_MI, estimator="WLSMV", std.lv=TRUE, group="Gender",
+                   ordered=c("Item_1","Item_2","Item_3","Item_4","Item_5","Item_6","Item_7","Item_8","Item_9"))
> sum=summary(sem.baseline, standardized=TRUE, rsquare=TRUE, fit.measures=TRUE)
lavaan (0.5-22) converged normally after  42 iterations

  Number of observations per group         
  1                                                315
  2                                                274

  Estimator                                       DWLS      Robust
  Minimum Function Test Statistic               45.054      50.907
  Degrees of freedom                                54          54
  P-value (Chi-square)                           0.802       0.594
  Scaling correction factor                                  0.951
  Shift parameter for each group:
    1                                                        1.895
    2                                                        1.648
    for simple second-order correction (Mplus variant)

Chi-square for each group:

  1                                             23.999      27.124
  2                                             21.055      23.783

Model test baseline model:

  Minimum Function Test Statistic              147.364     140.236
  Degrees of freedom                                72          72
  P-value                                        0.000       0.000

User model versus baseline model:

  Comparative Fit Index (CFI)                    1.000       1.000
  Tucker-Lewis Index (TLI)                       1.158       1.060

  Robust Comparative Fit Index (CFI)                            NA
  Robust Tucker-Lewis Index (TLI)                               NA

Root Mean Square Error of Approximation:

  RMSEA                                          0.000       0.000
  90 Percent Confidence Interval          0.000  0.025       0.000  0.033
  P-value RMSEA <= 0.05                          1.000       0.999

  Robust RMSEA                                                  NA
  90 Percent Confidence Interval                             0.000     NA

Standardized Root Mean Square Residual:

  SRMR                                           0.077       0.077

Weighted Root Mean Square Residual:

  WRMR                                           1.001       1.001

Parameter Estimates:

  Information                                 Expected
  Standard Errors                           Robust.sem


Group 1 [1]:

Latent Variables:
                   Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
  Items =~                                                              
    Item_1            0.262    0.125    2.098    0.036    0.262    0.262
    Item_2            0.059    0.116    0.509    0.611    0.059    0.059
    Item_3            0.229    0.116    1.966    0.049    0.229    0.229
    Item_4            0.152    0.118    1.287    0.198    0.152    0.152
    Item_5            0.421    0.109    3.877    0.000    0.421    0.421
    Item_6            0.187    0.112    1.667    0.096    0.187    0.187
    Item_7            0.410    0.136    3.007    0.003    0.410    0.410
    Item_8           -0.351    0.137   -2.568    0.010   -0.351   -0.351
    Item_9            0.790    0.171    4.605    0.000    0.790    0.790

Intercepts:
                   Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
   .Item_1            0.000                               0.000    0.000
   .Item_2            0.000                               0.000    0.000
   .Item_3            0.000                               0.000    0.000
   .Item_4            0.000                               0.000    0.000
   .Item_5            0.000                               0.000    0.000
   .Item_6            0.000                               0.000    0.000
   .Item_7            0.000                               0.000    0.000
   .Item_8            0.000                               0.000    0.000
   .Item_9            0.000                               0.000    0.000
    Items             0.000                               0.000    0.000

Thresholds:
                   Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
    Item_1|t1        -0.853    0.081  -10.540    0.000   -0.853   -0.853
    Item_2|t1         0.172    0.071    2.418    0.016    0.172    0.172
    Item_3|t1        -0.336    0.072   -4.660    0.000   -0.336   -0.336
    Item_4|t1         0.156    0.071    2.193    0.028    0.156    0.156
    Item_5|t1        -0.060    0.071   -0.844    0.399   -0.060   -0.060
    Item_6|t1         0.328    0.072    4.548    0.000    0.328    0.328
    Item_7|t1        -1.054    0.087  -12.106    0.000   -1.054   -1.054
    Item_8|t1         1.273    0.096   13.249    0.000    1.273    1.273
    Item_9|t1        -1.188    0.092  -12.879    0.000   -1.188   -1.188

Variances:
                   Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
   .Item_1            0.932                               0.932    0.932
   .Item_2            0.997                               0.997    0.997
   .Item_3            0.948                               0.948    0.948
   .Item_4            0.977                               0.977    0.977
   .Item_5            0.823                               0.823    0.823
   .Item_6            0.965                               0.965    0.965
   .Item_7            0.832                               0.832    0.832
   .Item_8            0.877                               0.877    0.877
   .Item_9            0.377                               0.377    0.377
    Items             1.000                               1.000    1.000

Scales y*:
                   Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
    Item_1            1.000                               1.000    1.000
    Item_2            1.000                               1.000    1.000
    Item_3            1.000                               1.000    1.000
    Item_4            1.000                               1.000    1.000
    Item_5            1.000                               1.000    1.000
    Item_6            1.000                               1.000    1.000
    Item_7            1.000                               1.000    1.000
    Item_8            1.000                               1.000    1.000
    Item_9            1.000                               1.000    1.000

R-Square:
                   Estimate
    Item_1            0.068
    Item_2            0.003
    Item_3            0.052
    Item_4            0.023
    Item_5            0.177
    Item_6            0.035
    Item_7            0.168
    Item_8            0.123
    Item_9            0.623


Group 2 [2]:

Latent Variables:
                   Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
  Items =~                                                              
    Item_1            0.672    0.127    5.285    0.000    0.672    0.672
    Item_2            0.352    0.111    3.171    0.002    0.352    0.352
    Item_3            0.260    0.108    2.413    0.016    0.260    0.260
    Item_4            0.280    0.114    2.446    0.014    0.280    0.280
    Item_5            0.124    0.115    1.080    0.280    0.124    0.124
    Item_6            0.037    0.127    0.293    0.770    0.037    0.037
    Item_7            0.640    0.124    5.149    0.000    0.640    0.640
    Item_8            0.100    0.129    0.776    0.438    0.100    0.100
    Item_9            0.308    0.116    2.661    0.008    0.308    0.308

Intercepts:
                   Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
   .Item_1            0.000                               0.000    0.000
   .Item_2            0.000                               0.000    0.000
   .Item_3            0.000                               0.000    0.000
   .Item_4            0.000                               0.000    0.000
   .Item_5            0.000                               0.000    0.000
   .Item_6            0.000                               0.000    0.000
   .Item_7            0.000                               0.000    0.000
   .Item_8            0.000                               0.000    0.000
   .Item_9            0.000                               0.000    0.000
    Items             0.000                               0.000    0.000

Thresholds:
                   Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
    Item_1|t1        -0.580    0.081   -7.188    0.000   -0.580   -0.580
    Item_2|t1        -0.297    0.077   -3.854    0.000   -0.297   -0.297
    Item_3|t1         0.336    0.077    4.334    0.000    0.336    0.336
    Item_4|t1         0.297    0.077    3.854    0.000    0.297    0.297
    Item_5|t1         0.355    0.078    4.574    0.000    0.355    0.355
    Item_6|t1         0.715    0.083    8.583    0.000    0.715    0.715
    Item_7|t1        -0.646    0.082   -7.890    0.000   -0.646   -0.646
    Item_8|t1         0.865    0.087    9.932    0.000    0.865    0.865
    Item_9|t1        -0.680    0.083   -8.237    0.000   -0.680   -0.680

Variances:
                   Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
   .Item_1            0.549                               0.549    0.549
   .Item_2            0.876                               0.876    0.876
   .Item_3            0.932                               0.932    0.932
   .Item_4            0.922                               0.922    0.922
   .Item_5            0.985                               0.985    0.985
   .Item_6            0.999                               0.999    0.999
   .Item_7            0.590                               0.590    0.590
   .Item_8            0.990                               0.990    0.990
   .Item_9            0.905                               0.905    0.905
    Items             1.000                               1.000    1.000

Scales y*:
                   Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
    Item_1            1.000                               1.000    1.000
    Item_2            1.000                               1.000    1.000
    Item_3            1.000                               1.000    1.000
    Item_4            1.000                               1.000    1.000
    Item_5            1.000                               1.000    1.000
    Item_6            1.000                               1.000    1.000
    Item_7            1.000                               1.000    1.000
    Item_8            1.000                               1.000    1.000
    Item_9            1.000                               1.000    1.000

R-Square:
                   Estimate
    Item_1            0.451
    Item_2            0.124
    Item_3            0.068
    Item_4            0.078
    Item_5            0.015
    Item_6            0.001
    Item_7            0.410
    Item_8            0.010
    Item_9            0.095

> 
> sem.loadings<-sem(model=Model_1,data=data_MI, estimator="WLSMV", std.lv=TRUE, group="Gender",
+                   ordered=c("Item_1","Item_2","Item_3","Item_4","Item_5","Item_6","Item_7","Item_8","Item_9"),group.equal=c("loadings"))
> sum=summary(sem.loadings, standardized=TRUE, rsquare=TRUE, fit.measures=TRUE)
lavaan (0.5-22) converged normally after  32 iterations

  Number of observations per group         
  1                                                315
  2                                                274

  Estimator                                       DWLS      Robust
  Minimum Function Test Statistic               65.833      68.692
  Degrees of freedom                                63          63
  P-value (Chi-square)                           0.379       0.291
  Scaling correction factor                                  0.989
  Shift parameter for each group:
    1                                                        1.154
    2                                                        1.004
    for simple second-order correction (Mplus variant)

Chi-square for each group:

  1                                             38.721      40.287
  2                                             27.112      28.404

Model test baseline model:

  Minimum Function Test Statistic              147.364     140.236
  Degrees of freedom                                72          72
  P-value                                        0.000       0.000

User model versus baseline model:

  Comparative Fit Index (CFI)                    0.962       0.917
  Tucker-Lewis Index (TLI)                       0.957       0.905

  Robust Comparative Fit Index (CFI)                            NA
  Robust Tucker-Lewis Index (TLI)                               NA

Root Mean Square Error of Approximation:

  RMSEA                                          0.012       0.018
  90 Percent Confidence Interval          0.000  0.038       0.000  0.040
  P-value RMSEA <= 0.05                          0.997       0.995

  Robust RMSEA                                                  NA
  90 Percent Confidence Interval                             0.000     NA

Standardized Root Mean Square Residual:

  SRMR                                           0.094       0.094

Weighted Root Mean Square Residual:

  WRMR                                           1.210       1.210

Parameter Estimates:

  Information                                 Expected
  Standard Errors                           Robust.sem


Group 1 [1]:

Latent Variables:
                   Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
  Items =~                                                              
    Item_1  (.p1.)    0.511    0.093    5.479    0.000    0.511    0.511
    Item_2  (.p2.)    0.255    0.087    2.948    0.003    0.255    0.255
    Item_3  (.p3.)    0.242    0.084    2.884    0.004    0.242    0.242
    Item_4  (.p4.)    0.244    0.084    2.891    0.004    0.244    0.244
    Item_5  (.p5.)    0.235    0.082    2.849    0.004    0.235    0.235
    Item_6  (.p6.)    0.052    0.088    0.589    0.556    0.052    0.052
    Item_7  (.p7.)    0.636    0.102    6.245    0.000    0.636    0.636
    Item_8  (.p8.)   -0.010    0.097   -0.100    0.921   -0.010   -0.010
    Item_9  (.p9.)    0.431    0.097    4.461    0.000    0.431    0.431

Intercepts:
                   Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
   .Item_1            0.000                               0.000    0.000
   .Item_2            0.000                               0.000    0.000
   .Item_3            0.000                               0.000    0.000
   .Item_4            0.000                               0.000    0.000
   .Item_5            0.000                               0.000    0.000
   .Item_6            0.000                               0.000    0.000
   .Item_7            0.000                               0.000    0.000
   .Item_8            0.000                               0.000    0.000
   .Item_9            0.000                               0.000    0.000
    Items             0.000                               0.000    0.000

Thresholds:
                   Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
    Item_1|t1        -0.853    0.081  -10.540    0.000   -0.853   -0.853
    Item_2|t1         0.172    0.071    2.418    0.016    0.172    0.172
    Item_3|t1        -0.336    0.072   -4.660    0.000   -0.336   -0.336
    Item_4|t1         0.156    0.071    2.193    0.028    0.156    0.156
    Item_5|t1        -0.060    0.071   -0.844    0.399   -0.060   -0.060
    Item_6|t1         0.328    0.072    4.548    0.000    0.328    0.328
    Item_7|t1        -1.054    0.087  -12.106    0.000   -1.054   -1.054
    Item_8|t1         1.273    0.096   13.249    0.000    1.273    1.273
    Item_9|t1        -1.188    0.092  -12.879    0.000   -1.188   -1.188

Variances:
                   Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
   .Item_1            0.738                               0.738    0.738
   .Item_2            0.935                               0.935    0.935
   .Item_3            0.941                               0.941    0.941
   .Item_4            0.941                               0.941    0.941
   .Item_5            0.945                               0.945    0.945
   .Item_6            0.997                               0.997    0.997
   .Item_7            0.596                               0.596    0.596
   .Item_8            1.000                               1.000    1.000
   .Item_9            0.814                               0.814    0.814
    Items             1.000                               1.000    1.000

Scales y*:
                   Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
    Item_1            1.000                               1.000    1.000
    Item_2            1.000                               1.000    1.000
    Item_3            1.000                               1.000    1.000
    Item_4            1.000                               1.000    1.000
    Item_5            1.000                               1.000    1.000
    Item_6            1.000                               1.000    1.000
    Item_7            1.000                               1.000    1.000
    Item_8            1.000                               1.000    1.000
    Item_9            1.000                               1.000    1.000

R-Square:
                   Estimate
    Item_1            0.262
    Item_2            0.065
    Item_3            0.059
    Item_4            0.059
    Item_5            0.055
    Item_6            0.003
    Item_7            0.404
    Item_8            0.000
    Item_9            0.186


Group 2 [2]:

Latent Variables:
                   Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
  Items =~                                                              
    Item_1  (.p1.)    0.511    0.093    5.479    0.000    0.511    0.511
    Item_2  (.p2.)    0.255    0.087    2.948    0.003    0.255    0.255
    Item_3  (.p3.)    0.242    0.084    2.884    0.004    0.242    0.242
    Item_4  (.p4.)    0.244    0.084    2.891    0.004    0.244    0.244
    Item_5  (.p5.)    0.235    0.082    2.849    0.004    0.235    0.235
    Item_6  (.p6.)    0.052    0.088    0.589    0.556    0.052    0.052
    Item_7  (.p7.)    0.636    0.102    6.245    0.000    0.636    0.636
    Item_8  (.p8.)   -0.010    0.097   -0.100    0.921   -0.010   -0.010
    Item_9  (.p9.)    0.431    0.097    4.461    0.000    0.431    0.431

Intercepts:
                   Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
   .Item_1            0.000                               0.000    0.000
   .Item_2            0.000                               0.000    0.000
   .Item_3            0.000                               0.000    0.000
   .Item_4            0.000                               0.000    0.000
   .Item_5            0.000                               0.000    0.000
   .Item_6            0.000                               0.000    0.000
   .Item_7            0.000                               0.000    0.000
   .Item_8            0.000                               0.000    0.000
   .Item_9            0.000                               0.000    0.000
    Items             0.000                               0.000    0.000

Thresholds:
                   Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
    Item_1|t1        -0.580    0.081   -7.188    0.000   -0.580   -0.580
    Item_2|t1        -0.297    0.077   -3.854    0.000   -0.297   -0.297
    Item_3|t1         0.336    0.077    4.334    0.000    0.336    0.336
    Item_4|t1         0.297    0.077    3.854    0.000    0.297    0.297
    Item_5|t1         0.355    0.078    4.574    0.000    0.355    0.355
    Item_6|t1         0.715    0.083    8.583    0.000    0.715    0.715
    Item_7|t1        -0.646    0.082   -7.890    0.000   -0.646   -0.646
    Item_8|t1         0.865    0.087    9.932    0.000    0.865    0.865
    Item_9|t1        -0.680    0.083   -8.237    0.000   -0.680   -0.680

Variances:
                   Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
   .Item_1            0.738                               0.738    0.738
   .Item_2            0.935                               0.935    0.935
   .Item_3            0.941                               0.941    0.941
   .Item_4            0.941                               0.941    0.941
   .Item_5            0.945                               0.945    0.945
   .Item_6            0.997                               0.997    0.997
   .Item_7            0.596                               0.596    0.596
   .Item_8            1.000                               1.000    1.000
   .Item_9            0.814                               0.814    0.814
    Items             1.000                               1.000    1.000

Scales y*:
                   Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
    Item_1            1.000                               1.000    1.000
    Item_2            1.000                               1.000    1.000
    Item_3            1.000                               1.000    1.000
    Item_4            1.000                               1.000    1.000
    Item_5            1.000                               1.000    1.000
    Item_6            1.000                               1.000    1.000
    Item_7            1.000                               1.000    1.000
    Item_8            1.000                               1.000    1.000
    Item_9            1.000                               1.000    1.000

R-Square:
                   Estimate
    Item_1            0.262
    Item_2            0.065
    Item_3            0.059
    Item_4            0.059
    Item_5            0.055
    Item_6            0.003
    Item_7            0.404
    Item_8            0.000
    Item_9            0.186

> 
> 
> anova(sem.baseline, sem.loadings)
Scaled Chi Square Difference Test (method = "satorra.2000")

             Df AIC BIC  Chisq Chisq diff Df diff Pr(>Chisq)  
sem.baseline 54         45.054                                
sem.loadings 63         65.833      13.89  7.8009    0.07762 .
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
> # 				#Check strict invariance
> 
> 
> sem.baseline_2<-sem(model=Model_1,data=data_MI, estimator="WLSMV", std.lv=TRUE, group="Gender",
+                   ordered=c("Item_1","Item_2","Item_3","Item_4","Item_5","Item_6","Item_7","Item_8","Item_9"))
> sum=summary(sem.baseline_2, standardized=TRUE, rsquare=TRUE, fit.measures=TRUE)
lavaan (0.5-22) converged normally after  42 iterations

  Number of observations per group         
  1                                                315
  2                                                274

  Estimator                                       DWLS      Robust
  Minimum Function Test Statistic               45.054      50.907
  Degrees of freedom                                54          54
  P-value (Chi-square)                           0.802       0.594
  Scaling correction factor                                  0.951
  Shift parameter for each group:
    1                                                        1.895
    2                                                        1.648
    for simple second-order correction (Mplus variant)

Chi-square for each group:

  1                                             23.999      27.124
  2                                             21.055      23.783

Model test baseline model:

  Minimum Function Test Statistic              147.364     140.236
  Degrees of freedom                                72          72
  P-value                                        0.000       0.000

User model versus baseline model:

  Comparative Fit Index (CFI)                    1.000       1.000
  Tucker-Lewis Index (TLI)                       1.158       1.060

  Robust Comparative Fit Index (CFI)                            NA
  Robust Tucker-Lewis Index (TLI)                               NA

Root Mean Square Error of Approximation:

  RMSEA                                          0.000       0.000
  90 Percent Confidence Interval          0.000  0.025       0.000  0.033
  P-value RMSEA <= 0.05                          1.000       0.999

  Robust RMSEA                                                  NA
  90 Percent Confidence Interval                             0.000     NA

Standardized Root Mean Square Residual:

  SRMR                                           0.077       0.077

Weighted Root Mean Square Residual:

  WRMR                                           1.001       1.001

Parameter Estimates:

  Information                                 Expected
  Standard Errors                           Robust.sem


Group 1 [1]:

Latent Variables:
                   Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
  Items =~                                                              
    Item_1            0.262    0.125    2.098    0.036    0.262    0.262
    Item_2            0.059    0.116    0.509    0.611    0.059    0.059
    Item_3            0.229    0.116    1.966    0.049    0.229    0.229
    Item_4            0.152    0.118    1.287    0.198    0.152    0.152
    Item_5            0.421    0.109    3.877    0.000    0.421    0.421
    Item_6            0.187    0.112    1.667    0.096    0.187    0.187
    Item_7            0.410    0.136    3.007    0.003    0.410    0.410
    Item_8           -0.351    0.137   -2.568    0.010   -0.351   -0.351
    Item_9            0.790    0.171    4.605    0.000    0.790    0.790

Intercepts:
                   Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
   .Item_1            0.000                               0.000    0.000
   .Item_2            0.000                               0.000    0.000
   .Item_3            0.000                               0.000    0.000
   .Item_4            0.000                               0.000    0.000
   .Item_5            0.000                               0.000    0.000
   .Item_6            0.000                               0.000    0.000
   .Item_7            0.000                               0.000    0.000
   .Item_8            0.000                               0.000    0.000
   .Item_9            0.000                               0.000    0.000
    Items             0.000                               0.000    0.000

Thresholds:
                   Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
    Item_1|t1        -0.853    0.081  -10.540    0.000   -0.853   -0.853
    Item_2|t1         0.172    0.071    2.418    0.016    0.172    0.172
    Item_3|t1        -0.336    0.072   -4.660    0.000   -0.336   -0.336
    Item_4|t1         0.156    0.071    2.193    0.028    0.156    0.156
    Item_5|t1        -0.060    0.071   -0.844    0.399   -0.060   -0.060
    Item_6|t1         0.328    0.072    4.548    0.000    0.328    0.328
    Item_7|t1        -1.054    0.087  -12.106    0.000   -1.054   -1.054
    Item_8|t1         1.273    0.096   13.249    0.000    1.273    1.273
    Item_9|t1        -1.188    0.092  -12.879    0.000   -1.188   -1.188

Variances:
                   Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
   .Item_1            0.932                               0.932    0.932
   .Item_2            0.997                               0.997    0.997
   .Item_3            0.948                               0.948    0.948
   .Item_4            0.977                               0.977    0.977
   .Item_5            0.823                               0.823    0.823
   .Item_6            0.965                               0.965    0.965
   .Item_7            0.832                               0.832    0.832
   .Item_8            0.877                               0.877    0.877
   .Item_9            0.377                               0.377    0.377
    Items             1.000                               1.000    1.000

Scales y*:
                   Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
    Item_1            1.000                               1.000    1.000
    Item_2            1.000                               1.000    1.000
    Item_3            1.000                               1.000    1.000
    Item_4            1.000                               1.000    1.000
    Item_5            1.000                               1.000    1.000
    Item_6            1.000                               1.000    1.000
    Item_7            1.000                               1.000    1.000
    Item_8            1.000                               1.000    1.000
    Item_9            1.000                               1.000    1.000

R-Square:
                   Estimate
    Item_1            0.068
    Item_2            0.003
    Item_3            0.052
    Item_4            0.023
    Item_5            0.177
    Item_6            0.035
    Item_7            0.168
    Item_8            0.123
    Item_9            0.623


Group 2 [2]:

Latent Variables:
                   Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
  Items =~                                                              
    Item_1            0.672    0.127    5.285    0.000    0.672    0.672
    Item_2            0.352    0.111    3.171    0.002    0.352    0.352
    Item_3            0.260    0.108    2.413    0.016    0.260    0.260
    Item_4            0.280    0.114    2.446    0.014    0.280    0.280
    Item_5            0.124    0.115    1.080    0.280    0.124    0.124
    Item_6            0.037    0.127    0.293    0.770    0.037    0.037
    Item_7            0.640    0.124    5.149    0.000    0.640    0.640
    Item_8            0.100    0.129    0.776    0.438    0.100    0.100
    Item_9            0.308    0.116    2.661    0.008    0.308    0.308

Intercepts:
                   Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
   .Item_1            0.000                               0.000    0.000
   .Item_2            0.000                               0.000    0.000
   .Item_3            0.000                               0.000    0.000
   .Item_4            0.000                               0.000    0.000
   .Item_5            0.000                               0.000    0.000
   .Item_6            0.000                               0.000    0.000
   .Item_7            0.000                               0.000    0.000
   .Item_8            0.000                               0.000    0.000
   .Item_9            0.000                               0.000    0.000
    Items             0.000                               0.000    0.000

Thresholds:
                   Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
    Item_1|t1        -0.580    0.081   -7.188    0.000   -0.580   -0.580
    Item_2|t1        -0.297    0.077   -3.854    0.000   -0.297   -0.297
    Item_3|t1         0.336    0.077    4.334    0.000    0.336    0.336
    Item_4|t1         0.297    0.077    3.854    0.000    0.297    0.297
    Item_5|t1         0.355    0.078    4.574    0.000    0.355    0.355
    Item_6|t1         0.715    0.083    8.583    0.000    0.715    0.715
    Item_7|t1        -0.646    0.082   -7.890    0.000   -0.646   -0.646
    Item_8|t1         0.865    0.087    9.932    0.000    0.865    0.865
    Item_9|t1        -0.680    0.083   -8.237    0.000   -0.680   -0.680

Variances:
                   Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
   .Item_1            0.549                               0.549    0.549
   .Item_2            0.876                               0.876    0.876
   .Item_3            0.932                               0.932    0.932
   .Item_4            0.922                               0.922    0.922
   .Item_5            0.985                               0.985    0.985
   .Item_6            0.999                               0.999    0.999
   .Item_7            0.590                               0.590    0.590
   .Item_8            0.990                               0.990    0.990
   .Item_9            0.905                               0.905    0.905
    Items             1.000                               1.000    1.000

Scales y*:
                   Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
    Item_1            1.000                               1.000    1.000
    Item_2            1.000                               1.000    1.000
    Item_3            1.000                               1.000    1.000
    Item_4            1.000                               1.000    1.000
    Item_5            1.000                               1.000    1.000
    Item_6            1.000                               1.000    1.000
    Item_7            1.000                               1.000    1.000
    Item_8            1.000                               1.000    1.000
    Item_9            1.000                               1.000    1.000

R-Square:
                   Estimate
    Item_1            0.451
    Item_2            0.124
    Item_3            0.068
    Item_4            0.078
    Item_5            0.015
    Item_6            0.001
    Item_7            0.410
    Item_8            0.010
    Item_9            0.095

> 
> sem.load_thres_2<-sem(model=Model_1,data=data_MI, estimator="WLSMV", std.lv=TRUE, group="Gender",
+                   ordered=c("Item_1","Item_2","Item_3","Item_4","Item_5","Item_6","Item_7","Item_8","Item_9"),group.equal=c("loadings","thresholds" ))
Warning message:
In lavaan::lavaan(model = Model_1, data = data_MI, std.lv = TRUE,  :
  lavaan WARNING: model has NOT converged!
> sum=summary(sem.load_thres_2, standardized=TRUE, rsquare=TRUE, fit.measures=TRUE)
** WARNING ** lavaan (0.5-22) did NOT converge after 644 iterations
** WARNING ** Estimates below are most likely unreliable

  Number of observations per group         
  1                                                315
  2                                                274

  Estimator                                       DWLS
  Minimum Function Test Statistic                   NA
  Degrees of freedom                                NA
  P-value                                           NA

Chi-square for each group:

  1                                                 NA
  2                                                 NA

Parameter Estimates:

  Information                                 Expected
  Standard Errors                           Robust.sem


Group 1 [1]:

Latent Variables:
                   Estimate    Std.Err  z-value  P(>|z|)   Std.lv    Std.all
  Items =~                                                                  
    Item_1  (.p1.)      0.302       NA                        0.302    0.302
    Item_2  (.p2.)      0.000       NA                        0.000    0.000
    Item_3  (.p3.)      0.321       NA                        0.321    0.321
    Item_4  (.p4.)      0.000       NA                        0.000    0.000
    Item_5  (.p5.)      0.534       NA                        0.534    0.534
    Item_6  (.p6.)      0.040       NA                        0.040    0.040
    Item_7  (.p7.)      0.366       NA                        0.366    0.366
    Item_8  (.p8.)     -0.053       NA                       -0.053   -0.053
    Item_9  (.p9.)      0.335       NA                        0.335    0.335

Intercepts:
                   Estimate    Std.Err  z-value  P(>|z|)   Std.lv    Std.all
   .Item_1              0.000                                 0.000    0.000
   .Item_2              0.000                                 0.000    0.000
   .Item_3              0.000                                 0.000    0.000
   .Item_4              0.000                                 0.000    0.000
   .Item_5              0.000                                 0.000    0.000
   .Item_6              0.000                                 0.000    0.000
   .Item_7              0.000                                 0.000    0.000
   .Item_8              0.000                                 0.000    0.000
   .Item_9              0.000                                 0.000    0.000
    Items               0.000                                 0.000    0.000

Thresholds:
                   Estimate    Std.Err  z-value  P(>|z|)   Std.lv    Std.all
    Itm_1|1 (.10.)     -0.858       NA                       -0.858   -0.858
    Itm_2|1 (.11.)     -0.000       NA                       -0.000   -0.000
    Itm_3|1 (.12.)     -0.304       NA                       -0.304   -0.304
    Itm_4|1 (.13.)     -0.000       NA                       -0.000   -0.000
    Itm_5|1 (.14.)     -0.054       NA                       -0.054   -0.054
    Itm_6|1 (.15.)      0.333       NA                        0.333    0.333
    Itm_7|1 (.16.)     -1.072       NA                       -1.072   -1.072
    Itm_8|1 (.17.)      1.277       NA                        1.277    1.277
    Itm_9|1 (.18.)     -1.227       NA                       -1.227   -1.227

Variances:
                   Estimate    Std.Err  z-value  P(>|z|)   Std.lv    Std.all
   .Item_1              0.909                                 0.909    0.909
   .Item_2              1.000                                 1.000    1.000
   .Item_3              0.897                                 0.897    0.897
   .Item_4              1.000                                 1.000    1.000
   .Item_5              0.715                                 0.715    0.715
   .Item_6              0.998                                 0.998    0.998
   .Item_7              0.866                                 0.866    0.866
   .Item_8              0.997                                 0.997    0.997
   .Item_9              0.888                                 0.888    0.888
    Items               1.000                                 1.000    1.000

Scales y*:
                   Estimate    Std.Err  z-value  P(>|z|)   Std.lv    Std.all
    Item_1              1.000                                 1.000    1.000
    Item_2              1.000                                 1.000    1.000
    Item_3              1.000                                 1.000    1.000
    Item_4              1.000                                 1.000    1.000
    Item_5              1.000                                 1.000    1.000
    Item_6              1.000                                 1.000    1.000
    Item_7              1.000                                 1.000    1.000
    Item_8              1.000                                 1.000    1.000
    Item_9              1.000                                 1.000    1.000

R-Square:
                   Estimate  
    Item_1              0.091
    Item_2              0.000
    Item_3              0.103
    Item_4              0.000
    Item_5              0.285
    Item_6              0.002
    Item_7              0.134
    Item_8              0.003
    Item_9              0.112


Group 2 [2]:

Latent Variables:
                   Estimate    Std.Err  z-value  P(>|z|)   Std.lv    Std.all
  Items =~                                                                  
    Item_1  (.p1.)      0.302       NA                        0.302    0.639
    Item_2  (.p2.)      0.000       NA                        0.000    0.342
    Item_3  (.p3.)      0.321       NA                        0.321    0.298
    Item_4  (.p4.)      0.000       NA                        0.000    0.283
    Item_5  (.p5.)      0.534       NA                        0.534    0.183
    Item_6  (.p6.)      0.040       NA                        0.040    0.070
    Item_7  (.p7.)      0.366       NA                        0.366    0.641
    Item_8  (.p8.)     -0.053       NA                       -0.053   -0.039
    Item_9  (.p9.)      0.335       NA                        0.335    0.377

Intercepts:
                   Estimate    Std.Err  z-value  P(>|z|)   Std.lv    Std.all
   .Item_1              0.000                                 0.000    0.000
   .Item_2              0.000                                 0.000    0.000
   .Item_3              0.000                                 0.000    0.000
   .Item_4              0.000                                 0.000    0.000
   .Item_5              0.000                                 0.000    0.000
   .Item_6              0.000                                 0.000    0.000
   .Item_7              0.000                                 0.000    0.000
   .Item_8              0.000                                 0.000    0.000
   .Item_9              0.000                                 0.000    0.000
    Items              -1.933       NA                       -1.933   -1.933

Thresholds:
                   Estimate    Std.Err  z-value  P(>|z|)   Std.lv    Std.all
    Itm_1|1 (.10.)     -0.858       NA                       -0.858   -1.812
    Itm_2|1 (.11.)     -0.000       NA                       -0.000   -0.958
    Itm_3|1 (.12.)     -0.304       NA                       -0.304   -0.282
    Itm_4|1 (.13.)     -0.000       NA                       -0.000   -0.249
    Itm_5|1 (.14.)     -0.054       NA                       -0.054   -0.018
    Itm_6|1 (.15.)      0.333       NA                        0.333    0.576
    Itm_7|1 (.16.)     -1.072       NA                       -1.072   -1.875
    Itm_8|1 (.17.)      1.277       NA                        1.277    0.936
    Itm_9|1 (.18.)     -1.227       NA                       -1.227   -1.381

Variances:
                   Estimate    Std.Err  z-value  P(>|z|)   Std.lv    Std.all
   .Item_1              0.133                                 0.133    0.592
   .Item_2              0.000                                 0.000    0.883
   .Item_3              1.057                                 1.057    0.911
   .Item_4              0.000                                 0.000    0.920
   .Item_5              8.283                                 8.283    0.967
   .Item_6              0.332                                 0.332    0.995
   .Item_7              0.193                                 0.193    0.589
   .Item_8              1.857                                 1.857    0.998
   .Item_9              0.676                                 0.676    0.858
    Items               1.000                                 1.000    1.000

Scales y*:
                   Estimate    Std.Err  z-value  P(>|z|)   Std.lv    Std.all
    Item_1              2.112       NA                        2.112    1.000
    Item_2         493202.494       NA                   493202.494    1.000
    Item_3              0.928       NA                        0.928    1.000
    Item_4          31677.581       NA                    31677.581    1.000
    Item_5              0.342       NA                        0.342    1.000
    Item_6              1.731       NA                        1.731    1.000
    Item_7              1.749       NA                        1.749    1.000
    Item_8              0.733       NA                        0.733    1.000
    Item_9              1.126       NA                        1.126    1.000

R-Square:
                   Estimate  
    Item_1              0.408
    Item_2              0.117
    Item_3              0.089
    Item_4              0.080
    Item_5              0.033
    Item_6              0.005
    Item_7              0.411
    Item_8              0.002
    Item_9              0.142

Warning message:
In .local(object, ...) :
  lavaan WARNING: fit measures not available if model did not converge


> 
> 
> 
> anova(sem.baseline_2, sem.load_thres_2)
Chi Square Difference Test

                 Df AIC BIC  Chisq Chisq diff Df diff Pr(>Chisq)
sem.baseline_2   54         45.054                              
sem.load_thres_2 



All your comments, hints and suggestions are welcome. Thank you so much!!

Best,
Philipp



Terrence Jorgensen

unread,
Nov 17, 2016, 7:38:32 AM11/17/16
to lavaan
my data are categorical

Specifically, they are binary.  This has practical implications, namely that you cannot have separate tests of weak and strong invariance because any differences in factor loadings can be re-expressed as differences in thresholds when you constrain loadings.  Check out the information on this web page, including a link to a great article on the subject, as well as many lavaan examples.


THe first check (weak invarinace) works well

You cannot draw that conclusion when you have binary indicators.  You have to constrain loadings and thresholds in a single step and compare that model to the configural model (which is what you did next).

but in the second check (strict invariance) the model has not converged.

You tested strong invariance (constraining loadings and thresholds).  Strict invariance is when the residual variances are also constrained to equality across groups.  That constraint is not required for comparing common-factor parameters across groups, so you do not need to test strict invariance.

Actually, you need to refine your tests anyway.  When you constrain loadings and thresholds across groups, you need to free the factor variance and mean in all but the first group.  Otherwise, you are simultaneously testing two hypotheses instead of one: is there invariance AND are the distributions of common factors identical across groups.  You need to test the first hypothesis (invariance) separately.  The easiest way to do this correctly would be to set std.lv = FALSE.  Even easier, you could use the measurementInvarianceCat() function in the semTools package, which is written by the person who wrote the web page I linked to above, so it implements the steps automatically and correctly.

The overly restrictive strong-invariance model may be the reason for nonconvergence, but I think it is more likely that your configural model is incorrect.  Look at the configural model results.  In group 1, your factor does not appear related to items 2 or 4, whereas in group 2, your factor does not appear to be related to items 5, 6, or 8.  It looks like you are measuring different things in the two groups, or at least that the indicators do not all function equivalently.  So the strong invariance model is a gross model misspecification, in which case you should expect convergence problems (how can you converge on a single estimate across groups of a parameter that may not exist in all groups?).

Terrence D. Jorgensen
Postdoctoral Researcher, Methods and Statistics
Research Institute for Child Development and Education, the University of Amsterdam

Philipp Schäpers

unread,
Nov 17, 2016, 12:24:36 PM11/17/16
to lav...@googlegroups.com
Dear Terrence,

thank you so much!!! Your response was very very helpful! On the basis of your comments and the recommendations of Millsap and Yun-Tein's (2004) I refined my baseline/configural model. But I did not get even a fitted model for the configurale invariance, holy cow...are there so huge diffrences between groups... I mean configural invariance... or is it a really strict approach? Or is there a mystake in my syntax? Here you can see syntax and output:

library(foreign)
library(lavaan)


data_MI<-read.spss("Messinvarianz.sav", use.value.labels = FALSE, to.data.frame = TRUE)

Modell<- "Items=~c(1,1)*Item_1+Item_2+Item_3+Item_4+Item_5+
          Item_6+Item_7+Item_8+Item_9

Item_1 | c(t11, t11)*t1
Item_2 | c(t21, t21)*t1
Item_3 | c(t31, t31)*t1
Item_4 | c(t41, t41)*t1
Item_5 | c(t51, t51)*t1
Item_6 | c(t61, t61)*t1
Item_7 | c(t71, t71)*t1
Item_8 | c(t81, t81)*t1
Item_9 | c(t91, t91)*t1

Items ~~ NA*Items
Item_1 ~~ c(1, 1)*Item_1
Item_2 ~~ c(1, NA)*Item_2
Item_3 ~~ c(1, NA)*Item_3
Item_4 ~~ c(1, NA)*Item_4
Item_5 ~~ c(1, NA)*Item_5
Item_6 ~~ c(1, NA)*Item_6
Item_7 ~~ c(1, NA)*Item_7
Item_8  ~~ c(1, NA)*Item_8
Item_9  ~~ c(1, NA)*Item_9
Items ~ c(0, NA)*1"


sem.baseline <- sem(Modell,data=data_MI, group ="Gender", parameterization="theta", estimator="wlsmv",

                    ordered=c("Item_1","Item_2","Item_3","Item_4","Item_5","Item_6","Item_7","Item_8","Item_9"))
sum=summary(sem.baseline, standardized=TRUE, rsquare=TRUE, fit.measures=TRUE)

Warning message:
In lavaan::lavaan(model = Modell, data = data_MI, parameterization = "theta",  :

  lavaan WARNING: model has NOT converged!

Do you have any ideas? I am really suprised that there a maybe such huge differences between both groups...


All your comments, hints and suggestions are welcome. Thank you so much!!

Best,
Philipp







--
You received this message because you are subscribed to a topic in the Google Groups "lavaan" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/lavaan/V3YqttCkP1M/unsubscribe.
To unsubscribe from this group and all its topics, send an email to lavaan+unsubscribe@googlegroups.com.
To post to this group, send email to lav...@googlegroups.com.
Visit this group at https://groups.google.com/group/lavaan.
For more options, visit https://groups.google.com/d/optout.



--
Philipp Schäpers
Wichertstraße 51
10439 Berlin
Mobil: 0173/5446049

Terrence Jorgensen

unread,
Nov 18, 2016, 5:33:42 AM11/18/16
to lavaan
The model syntax you posted constrains thresholds across groups, so it is not the configural model.  The configural model has free loadings and thresholds across groups.  The scalar equivalence / strong invariance model has equality-constrained loadings and thresholds across groups.  Then you compare the configural and scalar/strong models.  The cfa() and sem() functions will automatically free the residual variances in the subsequent group when the loadings are constrained, so you don't have to add that to your syntax.  Likewise, using the default std.lv = FALSE will automatically fix the first loading to 1, so you don't need that in your syntax.  Actually, your syntax can quite simply be the factor loadings.

Modell <- '
Factor =~ Item_1 + Item_2 + Item_3 + Item_4 + Item_5 +
          Item_6 + Item_7 + Item_8 + Item_9
'
fit.configural <- cfa(Modell, data = data_MI, group = "Gender",
                      parameterization = "theta", estimator = "wlsmv",
                      ordered = paste0("Item_", 1:9))
fit.scalar <- cfa(Modell, data = data_MI, group = "Gender",
                  parameterization = "theta", estimator = "wlsmv",
                  ordered = paste0("Item_", 1:9),
                  group.equal = c("loadings","thresholds"))
anova(fit.configural, fit.scalar)
 
The reason for non-convergence is probably that you tried to freely estimate residual variances in Group 2 without constraining factor loadings to equality.

Philipp

unread,
Nov 21, 2016, 11:40:38 AM11/21/16
to lavaan
Hi,

thanks a lot for your response. Now, I am little bit confused. On your recommended website Sunthud Pornprasertmanit posted:

Dichotomous Items

For dichotomous items, the following specification is needed to set the scale identification:

  • For each factor, the factor loading of one marker variable is fixed (usually as 1). Other factor loadings are freely estimated across groups.
  • All thresholds are equally constrained across groups.
  • The unique variances of the first group are fixed as 1. The unique variances of other groups are freely estimated except that the unique variances of the marker variables are fixed as 1.
  • The factor covariance matrices (variances and covariances) of all groups are free.
  • The factor means of the first group are fixed as 0. The factor means of the other groups are freely estimated.

From here, we have configural invariance model. The weak invariance can be estiblished by constraining all free loadings to be equal across groups. The strong invariance cannot be established because the thresholds in the configural invariance model are all equally constrained to set the scale. The strict invariance can be established by fixing all unique variances of all groups to be 1.


So have Thresholds to be equally for configural Invariance or not? In your syntax thresholds are not equally in the configural model....

Terrence Jorgensen

unread,
Nov 22, 2016, 4:05:19 AM11/22/16
to lavaan
So have Thresholds to be equally for configural Invariance or not?

The answer is in the article linked on the same web page.  I hadn't read it over in a while, so I forgot about starting with equality constrained thresholds for binary items in the configural model.

Philipp

unread,
Nov 22, 2016, 10:05:34 AM11/22/16
to lavaan
Terrence! Thank you so much! You helped me a lot!!
Reply all
Reply to author
Forward
0 new messages