4

I used the optim() function in R to find the min log likelihood, however the diagonal elements of the inverse of Hessian matrix turned out to be negative.

> round(diag(solve(KFopt$hessian)),2)
[1]    0.00   -0.08   -0.03    0.00   -0.47   -0.18 -167.32

Does that mean the optimization is wrong? So what should I do if I want to extract standard deviation of each estimates?

Karolis Koncevičius
  • 4,282
  • 7
  • 30
  • 47
lsheng
  • 141
  • 4
  • 1
    Typically, you want to maximize the log likelihood (which is a concave function) rather than minimizing it. – Brian Borchers Dec 31 '13 at 05:38
  • I already coded the function as negative log likelihood, then I put optim(psi,fn = function,...) to minimize (negative log likelihood), I think it should be correct.. – lsheng Dec 31 '13 at 06:01
  • Have you tried to change your initial values when applying `optim`? – Stat Dec 31 '13 at 19:32
  • I did, and sometimes it did work. But I don't think it is robust enough... Occasionally it works for a while but no longer works for same set of initial values.. – lsheng Jan 06 '14 at 02:46
  • I think it is sometimes just about luck to get it run... – lsheng Jan 06 '14 at 02:47
  • https://stats.stackexchange.com/questions/68080/basic-question-about-fisher-information-matrix-and-relationship-to-hessian-and-s/68095#68095 this post has helped me to understand the relationship between the hessian and fisher to find the std. error – Danny Sep 19 '19 at 16:57

0 Answers0