Monday, February 27, 2006

Re: st: ML_max ado question

Brooks Taggert J <brooks.tagg@uwlax.edu>

> So I'm using the hurdle model from Stata Journal Vol 3, No2. > > program hurdle_ll > ... > ... > end > > ml model lf hurdle_ll [equation here], svy subpop (if [variable]=3D=3D1) > > ml max > > The first time through it runs fine, the second time it gives me the > following error: > > ML_subv already defined. > > I traced it to the ml_max.ado, and it looks like it stems from the svy > subpop () specification. How come its not being overwritten? > > I seem to have found an ugly work around where I just drop it before the > next run of the model. But clearly there has to be something prettier? > I imagine Hilbe's hurdle models might be a better idea, but alas I'm > working in version 8.2. > > Any thoughts?

TJ found a bug in -ml-. Fortunately, the fix will be ready in an ado-file update; unfortunately, ado-file updates are for Stata 9.

Stata 8 users will have to add the following line to ml_clear.ado:

capture drop $ML_subv

and place the modified copy in the 'UPDATES' directory (but not in the 'm' subdirectory; keep the original asis). Make sure your Stata 8 is fully up-to-date first. In Stata type

. sysdir

to see where 'UPDATES' is on your machine.

Note that using -ml- non-interactively does not have this problem, so try coding your call to -ml- with the -max- option, as in

ml model lf hurdle_ll [equation here], /// svy subpop(if [variable]==1) max

--Jeff jpitblado@stata.com * * 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/


Tag:


Links to this post:

Create a Link



<< Home

This page is powered by Blogger. Isn't yours?