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
"Gregory, Christian - ERS" <[email protected]>
To
"[email protected]" <[email protected]>
Subject
RE: st: ml estimator behavior
Date
Fri, 10 Jan 2014 12:04:19 +0000
Thanks!!
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Maarten Buis
Sent: Friday, January 10, 2014 7:02 AM
To: [email protected]
Subject: Re: st: ml estimator behavior
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/
This electronic message contains information generated by the USDA solely for the intended recipients. Any unauthorized interception of this message or the use or disclosure of the information it contains may violate the law and subject the violator to civil or criminal penalties. If you believe you have received this message in error, please notify the sender and delete the email immediately.
*
* 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/