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

st: Re: Using the variables from one sw-result in another regression


From   "Michael Blasnik" <[email protected]>
To   <[email protected]>
Subject   st: Re: Using the variables from one sw-result in another regression
Date   Wed, 19 Oct 2005 16:24:04 -0400

I think there might be an easier way, but this should work:

local cons "_cons"

local vars: colnames e(b)
local vars: list vars - cons

If you are looping in a do file, the first line only needs to occur once (before the loop). The last two lines can be inside a loop and should pick off the names of the independent variables in the last estimation results and put them in the local macro `vars'

Michael Blasnik
[email protected]


----- Original Message ----- From: "Torbj�rn Lindquist" <[email protected]>
To: <[email protected]>
Sent: Wednesday, October 19, 2005 3:59 PM
Subject: st: Using the variables from one sw-result in another regression



I am trying to identify the variables to used for matching. To do this I am using a method for identification of variables described in an article by de Luna and Waerenbaum (2005). They suggest that one should make an OLS regression of the outcome and use the significant variables in a probit on the treatment indicator. The variables that are significant in the last regression is affecting both treatment and outcome and they are therefor relatively good variables to include in the matching.

I use the sw command to see what variables passes the significance test. The question is, is there some way I can get the list of variables from the first regression into the second without having to type them in manually? It would help alot since I will do this for a large number of samples.

Regards
Torbj�rn Lindquist
PhD Student
Department of Economics
University of Ume�
*
*   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