Hi all,
I've encountered some problems. I would appreciate your response a lot.
I'm trying to use Maxlik package to do a maximum likelihood estimation. The programs gave the estimates but the Hessian calculation failed. I checked the r matrix following the post: https://www.aptech.com/questions/printing-te-hessian-gauss-10/ , and it turns out there is no linear dependencies; but the diagonal elements of the Hessian have very different magnitudes, so I suspect it is the scaling issue that causes the problem. So I'm now trying to rescale some of the variables to make all the variables have the same magnitude of variances and means, and I used the parameter estimates as starting values. The relative gradients turned to all zeros after 7 iterations; however, it then continues iterating with some of the iterations taking backsteps of 1 or 2. Up till now, there have been 23 iterations.
Does that suggest any problem? Should I not use the estimates as starting values? If so, what can I do to solve the Hessian calculation failure problem?
Many thanks and regards,
Ziwei
1 Answer
0
accepted
If you are rescaling the data, then the previous parameter estimates may not be a good starting point.
The lack of convergence with zero gradients may be because the tolderance is set to lower than what you see printed. Try setting _max_GradTol
to something smaller like 1e-3
and run it to see if it converges.
Your Answer
1 Answer
If you are rescaling the data, then the previous parameter estimates may not be a good starting point.
The lack of convergence with zero gradients may be because the tolderance is set to lower than what you see printed. Try setting _max_GradTol
to something smaller like 1e-3
and run it to see if it converges.