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]
Re: st: Best Logistic Regression Model
From
Jeph Herrin <[email protected]>
To
[email protected]
Subject
Re: st: Best Logistic Regression Model
Date
Wed, 19 Mar 2014 08:59:58 -0400
I agree with the advice to avoid -stepwise-. I've taken to using random
forests to rank predictors, but have yet to follow through on my threat
to implement this in Stata.
J
On 3/19/2014 9:47 AM, Richard Williams wrote:
Ideally you have some great theory which helps you pick predictors. You
then test whether the theory seems to be right. The -nestreg- command
can let you test a hierarchy of models.
But if you are going into this totally blind...
Check out -help stepwise- for info on how to do stepwise regression. But
first, read this brief discussion of the problems with stepwise:
http://www.stata.com/support/faqs/statistics/stepwise-regression-problems/
If you want to do stepwise anyway, you may want to do things like split
the sample randomly in two. Develop your model with one data set and
then see if you can confirm it with the other.
If you want to mass produce models, check out Nick Cox's -allpossible-,
available from SSC.
To get BIC and AIC tests, you can use commands like
sysuse auto
logit foreign weight
estat ic
est store m1
logit foreign weight mpg
est store m2
lrtest m1 m2, stats
You might also check out this Stata tip:
http://www.stata-journal.com/sjpdf.html?articlenum=dm0032
As for searching previous questions, the search info appears at the end
of every email that gets posted to the list.
At 05:51 AM 3/19/2014, T A wrote:
Hi,
I am writing an analysis plan for a very large dataset. My outcome is
binary. I have data on 10,000 patients. I need to comment on which
logistic regression model I would use, i.e. forward elimination,
backward elimination, stepwise etc. How do I go about choosing the
best logistic regression model? I know I can choose significant
predictors using univariate analysis first. Since the dataset is so
large and there are only 20 variables to look at, I think all
variables could have a singificant p value. Is there a more systematic
and stringent way of choosing predictors for a multivariable logistic
regression? How do I do AIC and BIC in STATA?
Sorry if this is a silly question. I am a newbie to stats. Thank you
so much for your help.
How do I search all the previous questions that has been asked on this
mailing list?
Best Regards
Ta
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/faqs/resources/statalist-faq/
* http://www.ats.ucla.edu/stat/stata/
-------------------------------------------
Richard Williams, Notre Dame Dept of Sociology
OFFICE: (574)631-6668, (574)631-6463
HOME: (574)289-5227
EMAIL: [email protected]
WWW: http://www.nd.edu/~rwilliam
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/faqs/resources/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/faqs/resources/statalist-faq/
* http://www.ats.ucla.edu/stat/stata/