Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: RE: v. 8 bootstrap vs. v.7 bstrap


From   "Greg Branch" <[email protected]>
To   <[email protected]>
Subject   st: RE: v. 8 bootstrap vs. v.7 bstrap
Date   Wed, 17 Sep 2003 10:18:05 -0500

We have run into this. 

The stata 8 version accumulates the results for you. The expression list
is/are the name of the return/global/etc. macro(s) in which your program
returns a result (or results) after each iteration. This does not stop
you from posting the results within your program if you for some reason
want to have the results in a file to further analyze the distribution
of your estimator or whatever.  

You could simply declare your program as sclass, Insert an "sreturn
local whatever" at the end of your program, and the "expression" that
you would add to the bootstrap command would be `s(whatever)'. You could
do this either instead of or as well as accumulating your own results
file. 

In answer to your last question, the `command' part of the bootstrap
syntax can be a program, as long as you make sure and load the program
first. 

-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Mike Lacy
Sent: Wednesday, September 17, 2003 9:59 AM
To: [email protected]
Subject: st: v. 8 bootstrap vs. v.7 bstrap


I have a bootstrapping program that I developed under v. 7, which I now 
want to rewrite to run as native code under v.8. I am discovering that, 
apparently, v.7's bstrap and v.8's bootstrap are more different than the

help documentation indicates. My immediate difficulty is this:  My
bstrap 
usage in the v.7 code took a program of my own ("MyProg")as an argument,

and several user-defined quantities were calculated and posted within
the 
program.  The bstrap command looked like this:
bstrap MyProg, size(100) reps(1000)

Under v.8, this usage occasions an error message indicating that this 
command lack an  an "expression list," but that seems irrelevant to me, 
since MyProg does its own posting.  Can someone enlighten me here about
how 
to satisfy bootstrap's apparent desire for an expression list? Perhaps
this 
is documented in the hard copy manuals (which I didn't buy)  but not in
the 
program help?

Also, I notice that the grammar for bootstrap in v. 8 indicates that it
is 
intended to take a command rather than a program as an argument,
although 
there is a reference in the help text indicating that it can take a user

program, as did bstrap.  Is there some significant change in the 
bootstrapping facilities between v.7 and v.8?

Regards,

=-=-=-=-=-=-=-=-=-=-=-=-=
Mike Lacy
Fort Collins CO
(970) 491-6721 office





*
*   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/



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