Relative gradients are zero for many iterations but Maxlik keeps running

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: , 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,


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.

You must login to post answers.

Have a Specific Question?

Get a real answer from a real person

Need Support?

Get help from our friendly experts.

Try GAUSS for 30 days for FREE

See what GAUSS can do for your data

© Aptech Systems, Inc. All rights reserved.

Privacy Policy