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

RE: st: which variables are in the model?

From   "Feiveson, Alan H. (JSC-SK311)" <[email protected]>
To   "[email protected]" <[email protected]>
Subject   RE: st: which variables are in the model?
Date   Thu, 5 Feb 2009 15:21:15 -0600

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.


-----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:

*   For searches and help try:

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