Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: re: getting a list of included variables in estimation


From   Kit Baum <[email protected]>
To   [email protected]
Subject   st: re: getting a list of included variables in estimation
Date   Tue, 31 Jul 2007 07:50:01 -0400

Henri said:

I have a lot of dummies in a dataset. I include them all during estimation,
but depending on the subsample that I do the estimation on, some are dropped
automatically due to multicollinarity. I would like to quickly test all
dummies that are included in the model, with a for loop over the included
dummies. But how do I get a varlist of the included dummies?

_rmcoll is your friend:

* mpg2, turn2 are copies of mpg and turn
reg price mpg mpg2 turn turn2
local regressors : colnames e(b)
local regressors: subinstr local regressors "_cons" " "
_rmcoll `regressors'
di "`varlist'"



Kit Baum, Boston College Economics and DIW Berlin
http://ideas.repec.org/e/pba1.html
An Introduction to Modern Econometrics Using Stata:
http://www.stata-press.com/books/imeus.html


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