stepwise: Stepwise Model Selection
Description
Usage
Arguments
Value
Author(s)
References
See Also
Examples
This function is a front end to the stepAIC
function in the
MASS package.
 (mod,
direction = ("backward/forward", "forward/backward", "backward", "forward"),
criterion = ("BIC", "AIC"), )

mod 
a model object of a class that can be handled by stepAIC .

direction 
if "backward/forward" (the default), selection starts with
the full model and eliminates predictors one at a time, at each step considering whether the
criterion will be improved by adding back in a variable removed at a previous step;
if "forward/backwards" , selection starts with a model including only a constant,
and adds predictors one at a time, at each step considering whether the criterion
will be improved by removing a previously added variable; "backwards" and
"forward" are similar without the reconsideration at each step.

criterion 
for selection. Either "BIC" (the default) or "AIC" . Note that
stepAIC labels the criterion in the output as "AIC" regardless of which
criterion is employed.

... 
arguments to be passed to stepAIC .

The model selected by stepAIC
.
John Fox jfox@mcmaster.ca
W. N. Venables and B. D. Ripley
Modern Applied Statistics Statistics with S, Fourth Edition
Springer, 2002.
stepAIC
 # adapted from ?stepAIC in MASS
(MASS)
(birthwt)
birthwt.glm < (low ~ ., = , = bwt)
(birthwt.glm, = )
(birthwt.glm, direction="forward/backward")
