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

From |
Partha Deb <partha.deb@hunter.cuny.edu> |

To |
statalist@hsphsun2.harvard.edu |

Subject |
Re: st: mata optimize with d2debug |

Date |
Fri, 25 Sep 2009 11:19:38 -0400 |

cheers. Partha Stas Kolenikov wrote:

I am programming a fairly large model and rather poorly identified model with a couple dozen parameters in Mata. Documentation on -mf_optimize- says: "When you have done things right, gradient vectors will differ by approximately 1e–12 or less and Hessians will differ by 1e–7 or less." I never get there; even a restricted version of the model that is known to converge well produces mreldifs of about 1e-7 and 1e-4, respectively. The mreldifs for the Hessian might start kinda high between 1 and 10, but they would eventually go down near the maximum. For the interesting (and poorly identified) models that I eventually want to fit, I get mreldifs around 1e-3 to 1e-5 in gradients for most iterations, while my mreldifs for the Hessian fluctuate between 1e-3 and 1. In the early steps far from the maximum, the mreldifs for the Hessian can be as large as 100 or so (that's for 20x20 matrix, remember), but they go down as I converge to the maximum. Since I am walking along a ridge, I would actually tend to trust my analytical derivatives more than I do the numeric derivatives. Is that reasonable? Any advice on this? I tried tighter convergence criteria, but the results did not change much.

-- Partha Deb Professor of Economics Hunter College ph: (212) 772-5435 fax: (212) 772-5398 http://urban.hunter.cuny.edu/~deb/ Emancipate yourselves from mental slavery None but ourselves can free our minds. - Bob Marley * * For searches and help try: * http://www.stata.com/help.cgi?search * http://www.stata.com/support/statalist/faq * http://www.ats.ucla.edu/stat/stata/

**Follow-Ups**:**Re: st: mata optimize with d2debug***From:*Stas Kolenikov <skolenik@gmail.com>

**References**:**st: mata optimize with d2debug***From:*Stas Kolenikov <skolenik@gmail.com>

- Prev by Date:
**Re: st: Efficient, foolproof calculation of matrix quadratic form with block-diagonal middle matrix? (Mata)** - Next by Date:
**Re: st: Efficient, foolproof calculation of matrix quadratic form with block-diagonal middle matrix? (Mata)** - Previous by thread:
**Re: st: mata optimize with d2debug** - Next by thread:
**Re: st: mata optimize with d2debug** - Index(es):

© Copyright 1996–2015 StataCorp LP | Terms of use | Privacy | Contact us | What's new | Site index |