Statalist


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

st: AW: question about indeplist


From   Maarten buis <[email protected]>
To   stata list <[email protected]>
Subject   st: AW: question about indeplist
Date   Mon, 22 Jun 2009 08:58:46 +0000 (GMT)

-----Ursprüngliche Nachricht-----
Von: Ariel Linden, 
> I saw your posting the other day in which you used indeplist as a way of
> checking why some variables were dropped from the xtreg model. I just 
> read through the help file for indeplist and wasn't sure how to apply it
> to see which variables are dropped because of colinearity. 

-indeplist- leaves behind a list of variables that where included in your
model. If you store all explanatory variables in a local, and than remove
the variables that where not dropped from that list, than what is left 
are the variables that where dropped. You can "subtract" two lists using
the -list- extended macro function, see the -help macrolists- and the
example below:

*-------- begin example ------------
sysuse auto, clear
gen domestic = !foreign
local all "foreign domestic"
reg mpg `all'
indeplist, local
local dropped : list all - X
di "`dropped'"
*--------- end example --------------

Hope this helps,
Maarten

-----------------------------------------
Maarten L. Buis
Institut fuer Soziologie
Universitaet Tuebingen
Wilhelmstrasse 36
72074 Tuebingen
Germany

http://home.fsw.vu.nl/m.buis/
-----------------------------------------


      

*
*   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–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index