|
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
Re: st: [Mata newbie] optimize() vs -ml-
Jeff,
again, thanks for your answer (I did post a reply to your answer a few
hours ago, but it hasn't appearedon the list yet).
Playing with your code, I noticed that -optimize- is indeed faster than
-ml- for small sample sizes, but that the reverse seems to be true for
larger N
I ran a few simulations (-simulate-, 100 replications) with varying N.
Below is the results using -v2- and -d2- (the same pattern can be found
with v1/d1 and v0/d0):
N=100
Variable | Obs Mean Std. Dev. Min Max
-------------+--------------------------------------------------------
optimize | 100 .00423 .0069947 0 .016
ml | 100 .05278 .0082298 .046 .078
N=1000
Variable | Obs Mean Std. Dev. Min Max
-------------+--------------------------------------------------------
optimize | 100 .03333 .0061727 .015 .062
ml | 100 .07604 .0079085 .062 .094
N=5000
Variable | Obs Mean Std. Dev. Min Max
-------------+--------------------------------------------------------
optimize | 100 .16598 .015475 .14 .218
ml | 100 .18982 .014276 .171 .25
N=10000
Variable | Obs Mean Std. Dev. Min Max
-------------+--------------------------------------------------------
optimize | 100 .33812 .0282104 .296 .422
ml | 100 .33324 .0244937 .296 .406
N=50000
Variable | Obs Mean Std. Dev. Min Max
-------------+--------------------------------------------------------
optimize | 100 2.00641 .2400445 1.625 2.875
ml | 100 1.73035 .2316291 1.406 2.719
Antoine
Jeff Pitblado, StataCorp LP wrote:
If Antoine can derive formulas for producing the gradient for an -ml- type
-d1- evaluator and the parameter level scores for an -optimize()- type -v1-
evaluator, a speed comparison will show that -ml- with -d1- and -optimize()-
with -v1- will be faster than -lf- and -v0-, respectively, and -optimize()-
will tend to be faster than -ml-.
--
Ce message a ete verifie par MailScanner
pour des virus ou des polluriels et rien de
suspect n'a ete trouve.
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/