Reputation: 7117
When doing a backward elimination using the step()
, is it possible to only include those factors that are significant, for example, at P<0.05?
I am using this line at the moment
step(FulMod3,direction="backward",trace=FALSE)
to get my final model.
Upvotes: 0
Views: 2045
Reputation: 226731
Answers to these questions give starting points
In particular they point you towards fastbw
in the rms
package, which can be used in conjunction with rms::lrm
(logistic regression). They also explain why stepwise regression via p values is often a really, really, really, BAD idea: see also http://www.stata.com/support/faqs/stat/stepwise.html . There are a few contexts where it is appropriate (otherwise Frank Harrell, the author of the rms
package and crusader against foolish uses of stepwise regression, wouldn't have written fastbw
), but they are relatively rare, usually dominated by (e.g.) penalized regression approaches or by stepwise approaches via AIC (as implemented in step
): see e.g. https://stats.stackexchange.com/questions/13686/what-are-modern-easily-used-alternatives-to-stepwise-regression and https://stats.stackexchange.com/questions/20836/algorithms-for-automatic-model-selection
Upvotes: 6