Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


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

st: RE: RE: Programmatically determining if predictors have been dropped from a model


From   "Barth Riley" <[email protected]>
To   <[email protected]>
Subject   st: RE: RE: Programmatically determining if predictors have been dropped from a model
Date   Thu, 16 Sep 2010 12:11:50 -0500

Thanks Martin!

Barth

-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Martin Weiss
Sent: Thursday, September 16, 2010 11:58 AM
To: [email protected]
Subject: st: RE: Programmatically determining if predictors have been
dropped from a model 


<>

Try Maarten`s -ssc d indeplist- then:


*************
sysuse auto, clear
logit foreign weight price
gen twotimesweight=2*weight
logit foreign weight price twotimesweight
qui indeplist
ret li
qui indeplist, dropped
ret li
*************


HTH
Martin

-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Barth Riley
Sent: Donnerstag, 16. September 2010 17:42
To: [email protected]
Subject: st: Programmatically determining if predictors have been dropped
from a model 

Dear Statalist

I am running a series of Monte Carlo simulations using logistic regression.
Occasionally, the regression analysis will drop a variable (due to
collinearity, the variable having only one value, or the variable perfectly
predicting the outcome). I would like to know when a variable has been
dropped in order to prevent my do file from crashing (i.e., when I call test
<indep. Var> and the variable doesn't exit in the model). I have tried using
both logistic and logit functions and neither provide information on the
variables left in the model (i.e., via return list), nor does the confirm
function work with variables as they exist in a model. Does anyone have any
suggestions? 

Thanks in advance

Barth



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

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

*
*   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–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index