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?