Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: ml estimator behavior


From   Maarten Buis <[email protected]>
To   [email protected]
Subject   Re: st: ml estimator behavior
Date   Fri, 10 Jan 2014 13:01:39 +0100

On Fri, Jan 10, 2014 at 12:26 PM, Gregory, Christian wrote:
> I  have written an .ado file for an ml estimator-a semi-ordered bivariate probit. But it behaves a little strangely.
> 1.      When I run it in lf0 mode (using numerical gradient and Hessian) it converges fine.
> 2.      When I use the gradient that I've written in debug mode, on the first iteration the gradient is always spot on (mreldif on the order of 1e-3 or 1e-4), but things diverge after that.
> 3.      When I run it in lf1 mode, it gets backed up very near the optimizing log likelihood value and won't converge.
>
> My question is this: is this behavior most likely due to there being an error in user-written gradient, or to the fact that user written gradient and the numerial Hessian don't play well together? Or could it be something else?

That is most likely an error in the user-written gradient (a lost
minus sign, a bracket in the wrong place, etc.). I have never
experienced a problem with combining a user-written gradient with a
numerical Hessian, but often enough a problem in my own gradients or
Hessians.

Good luck,
Maarten

---------------------------------
Maarten L. Buis
WZB
Reichpietschufer 50
10785 Berlin
Germany

http://www.maartenbuis.nl
---------------------------------
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index