Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, statalist.org is already up and running.


[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" <BarthRiley@comcast.net>
To   <statalist@hsphsun2.harvard.edu>
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: owner-statalist@hsphsun2.harvard.edu
[mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of Martin Weiss
Sent: Thursday, September 16, 2010 11:58 AM
To: statalist@hsphsun2.harvard.edu
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: owner-statalist@hsphsun2.harvard.edu
[mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of Barth Riley
Sent: Donnerstag, 16. September 2010 17:42
To: statalist@hsphsun2.harvard.edu
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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index