Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: which variables are in the model?


From   Austin Nichols <austinnichols@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: which variables are in the model?
Date   Thu, 5 Feb 2009 16:11:31 -0500

Alan <Alan.H.Feiveson@nasa.gov> :

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)
<Alan.H.Feiveson@nasa.gov> 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/



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