"NA/NaN Hessian evaluation" error message interpretation help

59 views
Skip to first unread message

Ari Fodeman

unread,
Jul 13, 2020, 10:34:28 AM7/13/20
to lavaan

Hello all,


I'm trying to run a CFA with ordinal and binary indicators. When I run the following code...

 

AlcMark_M1_CFA <- cfa(AlcMark_M1, data = Kampala,  estimator = "PML",missing="doubly.robust",test="none",

                      parameterization="theta", ordered=c("Q7_LFZRc","Q9_LZRc","Q12_LFZRc","Q13_X_LFZRc","Q15_LFZRcRv","Q16_X_LFRc","Q17_LFRc","Q18a_LF","Q18b_LF","Q18c_LF","Q86j_LF"))

 

...I get this error message:

 

Error in nlminb(start = cache$theta, objective = minObjective, gradient = minGradient,  : 

NA/NaN Hessian evaluation

 

I get the same message when I estimate with WLSMV, or change missing to using "listwise", "pairwise", or "available.cases".


I have tried running the model with and without manifest covariances that could account for some potential autocorrelation between variables, without any change.


I have tried running with both Lavaan 0.6-6 and the current dev version, without any change.


I have tried both theta and delta parameterization, as well as not specifying the parameterization.


I cannot find any explanation of what "NA/NaN Hessian evaluation" means, and I am having trouble understanding the rest of the error message.


Any ideas?

Yves Rosseel

unread,
Jul 16, 2020, 1:56:46 PM7/16/20
to lav...@googlegroups.com
> ...I get this error message:
>
> Error in nlminb(start = cache$theta, objective = minObjective, gradient
> = minGradient,  :
>
> NA/NaN Hessian evaluation

That looks like an issue with the computation of a polychoric
correlation. It so happens that I robustified this today in the dev
version of lavaan (0.6-7.1572). Could you try again with this version?

It may also work with older version (0.6-5).

If this doesn't help, I would like to investigate this further. It would
help if you could then send me a small script and a snippet of the data
(just enough to replicate the error message).

Yves.
Reply all
Reply to author
Forward
0 new messages