Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
From | Maarten Buis <maartenlbuis@gmail.com> |
To | statalist@hsphsun2.harvard.edu |
Subject | Re: st: Maximum Likelihood with mata vs Stata |
Date | Wed, 26 Mar 2014 09:55:18 +0100 |
I don't know the insides -ml-, but I am not surprised. What the evaluator program does is create a variable, and that is something Stata can do very quickly. In my experience you can get a lot of extra speed by specifying analytical solutions to the first and second derivatives (at the cost of spending extra time programming, checking, and debugging them). Hope this helps, Maarten On Tue, Mar 25, 2014 at 9:22 PM, Amparo Nagore Garcia <amparo.nagore@uv.es> wrote: > Hello everyone, > > I am estimating my own likelihood function of a correlated competing risks model following chapter 11 "Mata-based likelihood evaluators" of "Maximum Likelihood Estimation with Stata" from William Gould , Jeffrey Pitblado and Brian Poi. > So I have programmed in mata the evaluator function and I have used ml maximize to maximize the function. I am using Stata 11. > I have a large dataset and three destination states. I have to estimate 130 variables. > I have the impression that it is not faster than the estimation using my likelihood function estimated using my stata code for the evaluator function. Is it possible? It may be due to the fact that I am maximizing the function using "ml maximize", and in this case I am not taking advantage of the matrix computation. Is there any trick to make it faster? > > Any help will be really appreciated. > > Thank you very much in advance. > > Amparo > > * > * 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/ -- --------------------------------- 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/