Warning on Hessian decomposition and NaNs


New Member

I'm trying to make a CFA using R. Prior to this, I've imputed all missing data using regression estimation, so there are no negative values. Still, I nonstop get the following warnings in R:

Warning in eval(expr, envir, enclos) :
Could not compute QR decomposition of Hessian.
Optimization probably did not converge.

Warning in sqrt((outer(c, c) + C^2)/N) : NaNs produced

When I've conducted this analysis using Amos, it gave me resonable goodness of fit, while in R I get huge and negative numbers. Still, I really need to do this in R.
Could you please give me an advice on what I am doing wrong and what I am missing? I have lost two days searching for answers in R manuals and on cran site, but I am new with R so therefore completly lost.
Is there a function to identify which cases produce NaN? What should I do?


TS Contributor
I don't know exactly what you're trying to do, dont know CFA or Amos. But if estimation of a Hessian is involved it might be an initialvalueproblem, don't know if you're routine allows specification of initialvalues.

If you are using sem it seems to be a common mistake to make som modelmisspecification ... maybe these links serves youre purpose:



New Member
Thanks JesperHP. The link provided helped me confirm the error I was making, meaning trying to fit the model to a covariance matrix. I've changed it to correlational matrix and it worked perfectly, as it was supposed to.