# CFA in lavaan won't converge

I am attempting to run a CFA in lavaan but the model will not converge unless std.lv = TRUE. This is causing me concern, and I would like some help understanding some possible reasons why the model won't converge.

Here's a bit more details about the data:

• I have run a multivariate normality test and confirmed the data is non-normal, and I did not expect it to be as this is Likert scale data on a 5-point scale. However, each observation is the average score of 9 survey respondents, so I believe this means the data is continuous within lower and upper limits (1 and 5).
• Since it failed the normality test, I am using the MLM estimator and robust standard errors.
• There are 873 observations, 61 variables, and the CFA has 6 factors.

Below shows the R code. I show where the model fails and then I show the statistics with std.lv = TRUE so you can see the full summary of the model. I would appreciate any points on where there might be things I need to look further into or improve to help the model run better.

    > model4 <-'
+   engage     =~ V1.A.1.a.1 + V1.A.1.a.3 + V1.A.1.a.4 + V2.A.1.b + V2.A.1.d
+                 + V2.B.1.a + V2.B.1.c + V2.B.1.d + V2.B.1.f
+                 + V1.C.5.c + V2.A.1.c + V1.A.1.a.2 + V2.A.1.a + V2.A.2.b
+                 + V1.A.1.e.1 + V1.C.2.b
+   decisive   =~ V1.C.1.a + V1.C.1.b + V1.C.1.c + V1.C.2.b
+                 + V1.C.6 + V1.C.4.b
+   relate     =~ V1.A.1.a.1 + V1.A.1.a.3 + V1.A.1.b.3 + V2.A.1.b + V2.A.1.d
+                 + V2.B.1.a + V2.B.1.f + V2.B.1.b
+                 + V1.C.3.a + V1.C.3.b + V1.C.3.c + V1.C.4.a + V1.C.4.b + V1.C.4.c
+                 + V1.C.5.a + V1.C.5.c + V1.A.1.g.2 + V1.C.2.b
+   manage     =~ V2.A.2.c + V2.A.2.d + V2.B.1.a + V2.B.1.b + V2.B.1.c + V2.B.1.d
+                 + V2.B.1.e + V2.B.4.e + V2.B.4.g + V2.B.4.h + V2.B.5.a + V2.B.5.b
+                 + V2.B.5.c + V2.B.5.d + V2.C.1.a
+                 + V1.C.2.b
+   insight    =~ V1.A.1.b.1 + V1.A.1.b.2 + V2.B.3.a + V2.B.3.b
+                 + V1.C.7.a + V1.C.4.c
+   intuition  =~ V1.A.1.b.3 + V1.A.1.e.1 + V1.A.1.e.2
+                 + V1.A.1.e.3 + V1.A.1.f.2 + V1.A.1.g.1 + V1.A.1.g.2 + V2.A.2.d
+   analysis   =~ V1.A.1.a.1 + V1.A.1.a.2 + V1.A.1.a.4 + V1.A.1.b.3
+                 + V1.A.1.b.4 + V1.A.1.b.5 + V1.A.1.b.6 + V1.A.1.b.7 + V1.A.1.c.1
+                 + V1.A.1.c.2 + V1.A.1.d.1 + V2.A.1.a + V2.A.1.c + V2.A.1.e
+                 + V2.A.2.a + V2.A.2.b + V2.A.2.c + V2.B.2.i + V2.B.4.e
+                 + V2.B.4.g + V2.B.4.h + V1.C.7.b + V2.B.1.e
+
+   # Correlated residuals
+   V2.A.1.e ~~ V1.A.1.c.1
+   V2.A.1.e ~~ V1.A.1.c.2
+   V2.B.5.b ~~ V2.B.5.c
+   V1.A.1.a.2 ~~ V2.A.1.a
+   V2.B.4.g ~~ V2.B.4.h
+   V2.A.2.c ~~ V2.B.1.e
+   V2.B.1.c ~~ V2.B.1.d
+   V2.A.1.a ~~ V2.A.1.c
+   V1.A.1.b.4 ~~ V1.A.1.b.5
+   V1.A.1.a.4 ~~ V2.A.1.c
+   V1.A.1.a.2 ~~ V2.A.1.c
+   V1.A.1.a.3 ~~ V1.A.1.a.1
+   V1.A.1.a.4 ~~ V1.A.1.a.2
+   V2.A.1.b ~~ V1.A.1.a.1
+   V2.A.1.b ~~ V1.A.1.a.3
+   V2.A.1.a ~~ V1.A.1.a.4
+   V2.A.1.d ~~ V1.A.1.a.3
+   V2.A.1.d ~~ V2.A.1.b
+   V1.A.1.c.2 ~~ V1.A.1.c.1
+   V2.A.2.a ~~ V1.A.1.b.4
+   V2.A.2.a ~~ V1.A.1.b.5
+   V1.A.1.b.2 ~~ V1.A.1.b.1
+   '
> fitmodel4 <- cfa(model4, data = onet.active, estimator = "MLM", se="robust")
Warning message:
In lavaan::lavaan(model = model4, data = onet.active, estimator = "MLM",  :
lavaan WARNING:
the optimizer (NLMINB) claimed the model converged, but not all
elements of the gradient are (near) zero; the optimizer may not
have found a local solution use check.gradient = FALSE to skip
this check.
> fitmodel4 <- cfa(model4, data = onet.active, estimator = "MLM", se="robust", std.lv=TRUE)
> summary(fitmodel4, fit.measures=TRUE)
lavaan 0.6-9 ended normally after 366 iterations

Estimator                                         ML
Optimization method                           NLMINB
Number of model parameters                       197

Number of observations                           873

Model Test User Model:
Standard      Robust
Test Statistic                              12059.219   11161.254
Degrees of freedom                               1694        1694
P-value (Chi-square)                            0.000       0.000
Scaling correction factor                                   1.080
Satorra-Bentler correction

Model Test Baseline Model:

Test statistic                             75850.659   72601.538
Degrees of freedom                              1830        1830
P-value                                        0.000       0.000
Scaling correction factor                                  1.045

User Model versus Baseline Model:

Comparative Fit Index (CFI)                    0.860       0.866
Tucker-Lewis Index (TLI)                       0.849       0.855

Robust Comparative Fit Index (CFI)                         0.862
Robust Tucker-Lewis Index (TLI)                            0.851

Loglikelihood and Information Criteria:

Loglikelihood user model (H0)              -1182.893   -1182.893
Loglikelihood unrestricted model (H1)       4846.716    4846.716

Akaike (AIC)                                2759.786    2759.786
Bayesian (BIC)                              3699.858    3699.858
Sample-size adjusted Bayesian (BIC)         3074.232    3074.232

Root Mean Square Error of Approximation:

RMSEA                                          0.084       0.080
90 Percent confidence interval - lower         0.082       0.079
90 Percent confidence interval - upper         0.085       0.081
P-value RMSEA <= 0.05                          0.000       0.000

Robust RMSEA                                               0.083
90 Percent confidence interval - lower                     0.082
90 Percent confidence interval - upper                     0.085

Standardized Root Mean Square Residual:

SRMR                                           0.093       0.093

Parameter Estimates:

Standard errors                           Robust.sem
Information                                 Expected
Information saturated (h1) model          Structured

Latent Variables:
Estimate  Std.Err  z-value  P(>|z|)
engage =~
V1.A.1.a.1        0.334    0.014   23.924    0.000
V1.A.1.a.3        0.413    0.010   39.524    0.000
V1.A.1.a.4        0.368    0.021   17.519    0.000
V2.A.1.b          0.417    0.010   41.164    0.000
V2.A.1.d          0.436    0.010   41.697    0.000
V2.B.1.a          0.212    0.014   15.400    0.000
V2.B.1.c          0.280    0.017   16.039    0.000
V2.B.1.d          0.224    0.018   12.757    0.000
V2.B.1.f          0.256    0.014   18.464    0.000
V1.C.5.c          0.232    0.012   19.814    0.000
V2.A.1.c          0.331    0.021   15.382    0.000
V1.A.1.a.2        0.296    0.018   15.989    0.000
V2.A.1.a          0.261    0.017   15.804    0.000
V2.A.2.b          0.158    0.015   10.300    0.000
V1.A.1.e.1        0.147    0.008   18.424    0.000
V1.C.2.b         -0.182    0.017  -10.450    0.000
decisive =~
V1.C.1.a          0.347    0.011   32.334    0.000
V1.C.1.b          0.359    0.010   35.701    0.000
V1.C.1.c          0.325    0.009   35.644    0.000
V1.C.2.b          0.197    0.017   11.365    0.000
V1.C.6            0.200    0.012   16.841    0.000
V1.C.4.b          0.128    0.014    9.427    0.000
relate =~
V1.A.1.a.1        0.042    0.010    4.221    0.000
V1.A.1.a.3        0.048    0.011    4.368    0.000
V1.A.1.b.3        0.103    0.008   12.431    0.000
V2.A.1.b          0.019    0.010    1.853    0.064
V2.A.1.d          0.030    0.012    2.543    0.011
V2.B.1.a          0.180    0.011   16.661    0.000
V2.B.1.f          0.238    0.014   16.833    0.000
V2.B.1.b          0.074    0.009    8.688    0.000
V1.C.3.a          0.254    0.009   28.722    0.000
V1.C.3.b          0.471    0.013   36.169    0.000
V1.C.3.c          0.483    0.014   35.235    0.000
V1.C.4.a          0.367    0.009   41.581    0.000
V1.C.4.b          0.282    0.011   25.105    0.000
V1.C.4.c          0.249    0.009   27.033    0.000
V1.C.5.a          0.191    0.008   25.242    0.000
V1.C.5.c          0.138    0.012   11.831    0.000
V1.A.1.g.2        0.142    0.009   16.425    0.000
V1.C.2.b          0.169    0.012   14.275    0.000
manage =~
V2.A.2.c          0.170    0.017    9.863    0.000
V2.A.2.d          0.253    0.010   26.397    0.000
V2.B.1.a          0.086    0.013    6.501    0.000
V2.B.1.b          0.290    0.011   27.188    0.000
V2.B.1.c          0.169    0.019    9.059    0.000
V2.B.1.d          0.226    0.018   12.642    0.000
V2.B.1.e          0.263    0.020   13.328    0.000
V2.B.4.e          0.111    0.010   10.655    0.000
V2.B.4.g          0.088    0.013    6.594    0.000
V2.B.4.h          0.114    0.013    8.639    0.000
V2.B.5.a          0.271    0.010   26.364    0.000
V2.B.5.b          0.320    0.018   17.601    0.000
V2.B.5.c          0.276    0.017   16.593    0.000
V2.B.5.d          0.446    0.014   32.146    0.000
V2.C.1.a          0.383    0.019   20.377    0.000
V1.C.2.b          0.334    0.014   23.142    0.000
insight =~
V1.A.1.b.1        0.489    0.012   40.962    0.000
V1.A.1.b.2        0.487    0.012   41.234    0.000
V2.B.3.a          0.463    0.017   27.016    0.000
V2.B.3.b          0.236    0.014   16.315    0.000
V1.C.7.a          0.316    0.014   21.854    0.000
V1.C.4.c          0.146    0.009   17.110    0.000
intuition =~
V1.A.1.b.3        0.162    0.010   15.559    0.000
V1.A.1.e.1        0.265    0.011   25.234    0.000
V1.A.1.e.2        0.333    0.011   29.485    0.000
V1.A.1.e.3        0.325    0.013   25.409    0.000
V1.A.1.f.2        0.280    0.016   18.006    0.000
V1.A.1.g.1        0.151    0.011   13.742    0.000
V1.A.1.g.2        0.172    0.011   15.207    0.000
V2.A.2.d          0.088    0.011    8.004    0.000
analysis =~
V1.A.1.a.1        0.030    0.011    2.691    0.007
V1.A.1.a.2        0.244    0.019   12.839    0.000
V1.A.1.a.4        0.225    0.022   10.225    0.000
V1.A.1.b.3        0.209    0.010   20.933    0.000
V1.A.1.b.4        0.409    0.007   55.611    0.000
V1.A.1.b.5        0.444    0.008   54.941    0.000
V1.A.1.b.6        0.262    0.009   30.217    0.000
V1.A.1.b.7        0.247    0.010   23.974    0.000
V1.A.1.c.1        0.417    0.017   24.190    0.000
V1.A.1.c.2        0.336    0.015   22.152    0.000
V1.A.1.d.1        0.260    0.009   29.587    0.000
V2.A.1.a          0.265    0.017   15.710    0.000
V2.A.1.c          0.264    0.023   11.509    0.000
V2.A.1.e          0.375    0.018   21.428    0.000
V2.A.2.a          0.421    0.008   53.015    0.000
V2.A.2.b          0.330    0.017   19.737    0.000
V2.A.2.c          0.313    0.017   18.448    0.000
V2.B.2.i          0.452    0.011   42.102    0.000
V2.B.4.e          0.310    0.012   25.677    0.000
V2.B.4.g          0.446    0.014   30.878    0.000
V2.B.4.h          0.419    0.014   29.566    0.000
V1.C.7.b          0.461    0.014   33.123    0.000
V2.B.1.e          0.215    0.018   11.867    0.000

Covariances:
Estimate  Std.Err  z-value  P(>|z|)
.V1.A.1.c.1 ~~
.V2.A.1.e          0.180    0.011   16.812    0.000
.V1.A.1.c.2 ~~
.V2.A.1.e          0.160    0.009   16.859    0.000
.V2.B.5.b ~~
.V2.B.5.c          0.100    0.006   15.777    0.000
.V1.A.1.a.2 ~~
.V2.A.1.a          0.043    0.004    9.964    0.000
.V2.B.4.g ~~
.V2.B.4.h          0.043    0.003   16.062    0.000
.V2.A.2.c ~~
.V2.B.1.e          0.096    0.008   11.694    0.000
.V2.B.1.c ~~
.V2.B.1.d          0.047    0.004   10.798    0.000
.V2.A.1.c ~~
.V2.A.1.a          0.031    0.004    8.082    0.000
.V1.A.1.b.4 ~~
.V1.A.1.b.5        0.019    0.001   13.788    0.000
.V1.A.1.a.4 ~~
.V2.A.1.c          0.049    0.004   11.212    0.000
.V2.A.1.c ~~
.V1.A.1.a.2        0.032    0.004    7.824    0.000
.V1.A.1.a.1 ~~
.V1.A.1.a.3        0.017    0.001   11.245    0.000
.V1.A.1.a.4 ~~
.V1.A.1.a.2        0.039    0.004    9.535    0.000
.V1.A.1.a.1 ~~
.V2.A.1.b          0.011    0.002    6.502    0.000
.V1.A.1.a.3 ~~
.V2.A.1.b          0.007    0.002    4.275    0.000
.V1.A.1.a.4 ~~
.V2.A.1.a          0.034    0.004    9.094    0.000
.V1.A.1.a.3 ~~
.V2.A.1.d          0.011    0.002    6.475    0.000
.V2.A.1.b ~~
.V2.A.1.d          0.003    0.001    1.886    0.059
.V1.A.1.c.1 ~~
.V1.A.1.c.2        0.162    0.010   16.766    0.000
.V1.A.1.b.4 ~~
.V2.A.2.a          0.010    0.001    8.206    0.000
.V1.A.1.b.5 ~~
.V2.A.2.a          0.010    0.001    7.880    0.000
.V1.A.1.b.1 ~~
.V1.A.1.b.2        0.031    0.004    7.905    0.000
engage ~~
decisive          0.665    0.020   33.429    0.000
relate            0.442    0.033   13.453    0.000
manage            0.693    0.018   38.167    0.000
insight           0.715    0.019   37.534    0.000
intuition         0.075    0.039    1.939    0.052
analysis          0.796    0.016   48.750    0.000
decisive ~~
relate            0.419    0.033   12.498    0.000
manage            0.572    0.023   24.807    0.000
insight           0.723    0.019   38.969    0.000
intuition         0.093    0.042    2.239    0.025
analysis          0.681    0.020   33.576    0.000
relate ~~
manage            0.398    0.028   14.351    0.000
insight           0.113    0.039    2.912    0.004
intuition        -0.062    0.035   -1.769    0.077
analysis          0.148    0.037    3.990    0.000
manage ~~
insight           0.706    0.020   34.673    0.000
intuition         0.300    0.032    9.262    0.000
analysis          0.725    0.016   44.293    0.000
insight ~~
intuition         0.331    0.034    9.659    0.000
analysis          0.867    0.014   64.139    0.000
intuition ~~
analysis          0.488    0.030   16.266    0.000

Variances:
Estimate  Std.Err  z-value  P(>|z|)
.V1.A.1.a.1        0.032    0.002   15.093    0.000
.V1.A.1.a.3        0.031    0.002   14.565    0.000
.V1.A.1.a.4        0.066    0.004   15.018    0.000
.V2.A.1.b          0.023    0.002   10.771    0.000
.V2.A.1.d          0.027    0.002   11.825    0.000
.V2.B.1.a          0.050    0.003   18.763    0.000
.V2.B.1.c          0.065    0.005   12.182    0.000
.V2.B.1.d          0.073    0.006   11.647    0.000
.V2.B.1.f          0.091    0.005   17.876    0.000
.V1.C.5.c          0.075    0.005   15.635    0.000
.V2.A.1.c          0.069    0.005   12.721    0.000
.V1.A.1.a.2        0.062    0.005   12.837    0.000
.V2.A.1.a          0.051    0.004   12.036    0.000
.V2.A.2.b          0.043    0.002   19.813    0.000
.V1.A.1.e.1        0.038    0.002   17.041    0.000
.V1.C.2.b          0.060    0.004   14.764    0.000
.V1.C.1.a          0.031    0.002   13.799    0.000
.V1.C.1.b          0.022    0.002   12.198    0.000
.V1.C.1.c          0.022    0.001   15.205    0.000
.V1.C.6            0.087    0.004   21.463    0.000
.V1.C.4.b          0.058    0.005   12.601    0.000
.V1.A.1.b.3        0.045    0.003   16.994    0.000
.V2.B.1.b          0.035    0.002   18.132    0.000
.V1.C.3.a          0.039    0.002   16.077    0.000
.V1.C.3.b          0.068    0.004   16.604    0.000
.V1.C.3.c          0.076    0.005   15.998    0.000
.V1.C.4.a          0.035    0.002   15.566    0.000
.V1.C.4.c          0.042    0.002   16.895    0.000
.V1.C.5.a          0.039    0.003   15.408    0.000
.V1.A.1.g.2        0.061    0.003   21.130    0.000
.V2.A.2.c          0.115    0.008   14.761    0.000
.V2.A.2.d          0.057    0.003   20.162    0.000
.V2.B.1.e          0.133    0.010   13.728    0.000
.V2.B.4.e          0.030    0.002   18.543    0.000
.V2.B.4.g          0.061    0.003   19.224    0.000
.V2.B.4.h          0.056    0.003   18.973    0.000
.V2.B.5.a          0.037    0.002   15.770    0.000
.V2.B.5.b          0.134    0.009   15.487    0.000
.V2.B.5.c          0.118    0.007   18.046    0.000
.V2.B.5.d          0.048    0.003   15.130    0.000
.V2.C.1.a          0.186    0.009   20.059    0.000
.V1.A.1.b.1        0.042    0.004   10.720    0.000
.V1.A.1.b.2        0.053    0.005   11.184    0.000
.V2.B.3.a          0.184    0.010   17.936    0.000
.V2.B.3.b          0.103    0.007   15.287    0.000
.V1.C.7.a          0.123    0.007   18.889    0.000
.V1.A.1.e.2        0.034    0.003   13.394    0.000
.V1.A.1.e.3        0.045    0.003   14.384    0.000
.V1.A.1.f.2        0.169    0.009   18.070    0.000
.V1.A.1.g.1        0.033    0.002   13.505    0.000
.V1.A.1.b.4        0.027    0.001   18.219    0.000
.V1.A.1.b.5        0.034    0.002   18.610    0.000
.V1.A.1.b.6        0.044    0.003   17.361    0.000
.V1.A.1.b.7        0.043    0.003   16.667    0.000
.V1.A.1.c.1        0.193    0.011   17.502    0.000
.V1.A.1.c.2        0.166    0.009   17.823    0.000
.V1.A.1.d.1        0.060    0.005   13.001    0.000
.V2.A.1.e          0.200    0.011   17.946    0.000
.V2.A.2.a          0.025    0.002   16.444    0.000
.V2.B.2.i          0.030    0.002   17.940    0.000
.V1.C.7.b          0.105    0.006   18.439    0.000
engage            1.000
decisive          1.000
relate            1.000
manage            1.000
insight           1.000
intuition         1.000
analysis          1.000
$$$$


Just to add a few things to @Preston Botter's answer above, none of your fit indices show that your model shows even an adequate fit. For the comparative fit indices CFI and TLI, you need at least >.900. For the absolute fit indices RMSEA and SRMR, you should have <.080.

Your process of modelling can be greatly improved if you assess the individual CFA fit of each model first, and also check for the magnitude of factor loadings (every standardised factor loading should be at least > |.30|, meaning that each item explains at least about 10% of the variance in its latent factor). After modelling each factor individually, you will most likely identify the culprit that pushes your 6-factor model fit down. I've noticed that in your 6-factor model some standardised factor loadings are low.

Remember you always want to follow a three-step process: 1) Assess the CFA fit of each individual model; 2) Measurement model (all factors correlated); 3) Structural Model (where you specify the exact relationships among the factors tested in Step 2).

Also, you can use DWLS (it was developed to assess parameters for the Likert scale type items), but you can also try a Robust variant of the Maximum Likelihood ("MLR") - this estimator is robust against non-extreme deviations from normality. From experience, on an odd occasion, you might get a better fit with it than DWLS. However, DWLS should be your preferred choice.

• Thank you for your feedback, as well as @PrestonBotter. I am new at this and have taught myself with books and videos, so your direct feedback is incredibly insightful and gives me a lot of things to run with. I have a few follow-up questions: 1. The observations in my data are the averages of Likert scale data (on 1-5 scale) from 9 respondents for each datapoint, meaning that most of the data includes decimals (i.e. 3.45, 2.15, etc) with a lower and upper limit being 1 and 5. For this reason, I don't think the ordered function applies right? Does the DWLS still apply in this case?
– Zack
Aug 28, 2021 at 15:10
• 2. The data is from ONET's public database of Knowledge, Skills and Abilities in the workplace, for which I am attempting to determine latent variables. I believe one of the problems with the model is that some of the Knowledge and Ability items are underlying components of the Skills items, in which case I think I need to add some regressions in the model to account for this. There are also cases of correlated residuals among items. Should I mark these correlations and regressions as part of your Step 1, or does this come in Step 3?
– Zack
Aug 28, 2021 at 15:28
• 3. I wanted to run a PCA to assess my theoretical number of factors, but I believe it is less helpful because of the interrelation of items as discussed in my above question. How do I account for this in the PCA? For example, if two items are highly correlated, should I just remove one for purposes of the PCA, but add it back and mark as a residual correlation in the CFA?
– Zack
Aug 28, 2021 at 15:30
• @Zack I will try to comment on your points in turn. 1. You need to use DWLS when each item is ordered categorical (e.g. Likert Scale type itmes). If each of your items have characteristics of continuous data (averages of likert scale type questions), this is very common, you can use MLR or MLM even. This essentially uses Maximum Likelihood when estimating parameters and your estimates are fairly robust unless there are extreme deviations from multivariate Normality. Lavaan home page includes information on different types of estimators for you to try Aug 28, 2021 at 19:20
• @Zack it's not uncommon that when you fit a, for example, 1 factor CFA model, you get less than adequate fit. At this stage, it is always preferable to examine correlated residuals than removing items (should be an absolute last resort option). Try to include the first correlated residual that will give you the biggest fit improvement, then reassess fit. Continue adding correlated residuals 1 by 1 assessing improvements in fit everytime. When you include enough correlated residuals to have adequate fit, you stop. Report all these steps Aug 28, 2021 at 19:24

Your model does not fit the data very well (e.g., your CFI is well under 0.9), so I would not be too worried about why your model did not converge with std.level = TRUE. Instead, I would focus on ensuring your Likert scale items are properly modeled. This can be done by treating items as ordered and using the diagonally weighted least squares (DWLS) estimator. This most certainly will improve model fit. See the pseudocode (i.e., you will need to include the names of the Likert scale items) and link below and you should be running in no time!

fit_DWLS <- cfa(model4, data = onet.active, estimator = "DWLS", se="robust", ordered = item.names)`

https://www.lavaan.ugent.be/tutorial/tutorial.pdf