Hi, R developers.
when running mle inside a loop I found a nasty behavior. From time to time, my model had a degenerate minimum and the loop just crashed. I tracked it down to "vcov <- if (length(coef)) solve(oout$hessian)" line, being the hessian singular. Note that the minimum reached was good, it just did not make sense to calculate the covariance matrix as the inverse of a singular Hessian. In my case i am just interested on the value of the log-likelihood. For my application, I patched it easily in a local version of mle just removing this call since I am not using vcov at all, but i wonder if it can be improved in the official release. I can imagine of two simple solutions, either including vcov calculation as an option or avoiding the call to solve if the hessian is singular (setting vcov to NA). I am willing to write a few lines of coded if you think it is worth.

regards

Francisco Matorras
Instituto de FĂ­sica de Cantabria
Universidad de Cantabria

______________________________________________
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel

Reply via email to