lavaan WARNING: the optimizer (NLMINB) claimed the model converged, but not all elements of the gradient are (near) zero; with WLSMV

583 views
Skip to first unread message

Jan Szczypiński

unread,
Sep 17, 2019, 9:30:34 AM9/17/19
to lavaan
I try to fit a model of BIS-11 using WLSMV estimator.

The model:

model = '
attentional =~ bis5+bis9+bis11+bis20+bis28+bis6+bis24+bis26
motor =~ bis2+bis3+bis4+bis17+bis19+bis22+bis25+bis16+bis21+bis23+bis30
nonplaning =~ bis1+bis7+bis8+bis12+bis13+bis14+bis10+bis15+bis18+bis27+bis29
'
 fit = cfa(model, data = BIS_data, estimator = "WLSMV")

The fit function results in a warning:

Warning message:
In lav_model_estimate(lavmodel = lavmodel, lavpartable = lavpartable,  :
  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.

When I use the summary function i get another warning

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

and the information that

lavaan 0.6-5 did NOT end normally after 129 iterations"

It doesn't converge with any estimator based on DWLS, however it converges with ML estimators.

What's the reason for this? It's important for me to use the WLSMV.

Thanks in advance,

Jan Szczypiński

Terrence Jorgensen

unread,
Sep 18, 2019, 2:34:49 PM9/18/19
to lavaan
It doesn't converge with any estimator based on DWLS, however it converges with ML estimators.

What's the reason for this? It's important for me to use the WLSMV.

That's a lot of categorical items.  How many categories?  If you have a small N and many thresholds, then there might just be too many parameters for your data, whereas MLE would have more stable estimation (single step) and fewer parameters (1 intercept instead of k-1 thresholds per item).

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

Jan Szczypiński

unread,
Oct 11, 2019, 8:15:51 AM10/11/19
to lavaan

Sorry for such a long response. I was gone on vacations for the last 3 weeks. In turned out that it was caused by some missing values in the data structure.
Now, when it's fixed, everything goes smoot.
Reply all
Reply to author
Forward
0 new messages