Dear R-Users and R-Developers,

in a comparison between two different estimation approaches I would like to 
catch errors from optim regarding the hessian matrix.

I use optim with method = "L-BFGS-B" thereby relying on numerical 
differentiation for the hessian matrix. I do know, that the estimation approach 
that uses numerical optimization has sometimes problems with singular hessian 
matrices and I consider it as one of its disadvantages of this method. To show 
the frequency of such problems in my simulation study I have to set 'hessian = 
TRUE' and to collect the errors from optim regarding the hessian.

Now I am a little stucked how I could catch specifically errors from the 
hessian matrix in 'optim'. I do know that such errors are thrown most certainly 
from function 'La_solve' in Lapack.c. Does anyone has an idea how I could solve 
this task (clearly with tryCatch but how to choose only errors for the hessian)?


Best 

Simon
 
______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to