Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: ML_max ado question


From   [email protected] (Jeff Pitblado, StataCorp LP)
To   [email protected]
Subject   Re: st: ML_max ado question
Date   Mon, 27 Feb 2006 09:21:34 -0600

Brooks Taggert J <[email protected]>

> 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
[email protected]
*
*   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/



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