Build regression model from a set of candidate predictor variables by removing predictors based on Akaike Information Criteria, in a stepwise manner until there is no variable left to remove any more.
stepaic_backward(model, ...)
lm
step_backward
returns an object of class "step_backward"
.
An object of class "step_backward"
is a list containing the
following components:
# stepwise backward regression model <- lm(y ~ ., data = surgical) stepaic_backward(model)#> #> #> Backward Elimination Summary #> ------------------------------------------------------------------------- #> Variable AIC RSS Sum Sq R-Sq Adj. R-Sq #> ------------------------------------------------------------------------- #> Full Model 736.39 1825905.713 6543614.824 0.782 0.743 #> alc_mod 734.407 1826477.828 6543042.709 0.782 0.749 #> gender 732.494 1829435.617 6540084.92 0.781 0.754 #> age 730.62 1833716.447 6535804.09 0.781 0.758 #> ------------------------------------------------------------------------- #># stepwise backward regression plot model <- lm(y ~ ., data = surgical) k <- stepaic_backward(model) plot(k)