dear statalist,
please disregard this question; i found a post by greg branch on 9/17/03
that addresses this exact issue.
thanks,
chris
On Fri, 31 Oct 2003, Chris Rohlfs wrote:
> hello everyone,
>
> i'm having some problems getting a bootstrap program to work & would
> appreciate anyone's comments. i think the problem may be specific to
> version 8.
>
> anyways, i have a nonlinear estimation procedure nlcas, and i'm doing a
> bootstrap to calculate standard errors for the mean marginal effect of the
> variable x0. my program looks like this:
>
> program define nlmarg
> version 8.0
>
> if "`1'" == "?" {
> * the program output will be stored in the macro named t
> global S_1 "t"
> exit
> }
>
> * this calls the nonlinear program nlcas with dependent variable c
>
> quietly nl cas c
>
> * nlcas.ado produces two global macros, $X0 and X0ART. these two
> * enter into my equation for the marginal effect variable `margfx'
> * as below
>
> tempvar margfx
> gen `margfx' = $X0*c*(y0 + $X0ART*y0art)/(x0 + $X0ART*x0art)
> sum `margfx'
>
> local t = r(mean)
>
> post `1' (`t')
>
> end
>
> i run the program by typing this at the command line:
>
> bootstrap "nlmarg" t, reps(1000) dots noisily
>
> the program shows the mean for `margfx' from the first run, but then gives
> the error:
>
> ( invalid name
>
> command -> nlmarg
> error when command executed on original dataset under version 8 control
> r(198);
>
> i think this means that `t' does not pass the information it's supposed to
> be passing & instead simply returns nothing -- though i'm not quite sure
> why. i've tried writing it as $t as well & that doesn't seem to change
> things. any ideas of what could be the problem?
>
> thank you very much,
> chris
>
> *
> * 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/
>
*
* 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/