Austin -
Sorry - I meant -bootstrap-, not -bsample- in my last sentence below. In fact what you suggested in the first part of your response is what I have been doing - except my indices were wrong when variables were dropped.
But your idea of writing a new "eclass" program to save the postestimation tests looks like it should give me everything I need with -bootstrap-, which will do the correct bookkeeping. Thanks for the suggestion.
Al
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Austin Nichols
Sent: Thursday, February 05, 2009 3:12 PM
To: [email protected]
Subject: Re: st: which variables are in the model?
Alan <[email protected]> :
Anything can be done with -bsample- as long as you program it. The usual method is to put all the stuff you want to save in locals and then to -post- them to a file. The whole thing goes inside a loop and inside the loop you put a -use-, then a -bsample-, then your calculations, then save everything with a -post-. Before the loop, you put a -set seed- and a -postfile- call. After the loop, you
-postclose- and -bstat using-.
Alternatively, you can -save- an empty "work" dataset and -set seed- before you start the loop, then in the loop you -use-, -bsample-, calculate, store everything in variables, -collapse- if necessary,
-append- to the "work" dataset, and -save "work", replace-. The optimal approach depends on what you're doing, as usual.
But you don't need to do either to store the results of postestimation tests--you can declare a eclass program and add things to the estimation results with -ereturn-. Then -bs- the new program.
On Thu, Feb 5, 2009 at 3:55 PM, Feiveson, Alan H. (JSC-SK311) <[email protected]> wrote:
> Austin - Thanks for the program - I think it does what I want, except that I don't know how to modify it for multi-equation models - I am using -xtintreg-. The reason I want to do my own resampling is so I can store the results of various postestimation tests as well as the coefficient estimates - I don't think this can be done with -bsample- or can it??
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/