Fits all regressions involving one regressor, two regressors, three regressors, and so on. It tests all possible subsets of the set of potential independent variables.

all_subset(model, ...)

Arguments

model
an object of class lm
...
other arguments

Value

all_subset returns an object of class "all_subset". An object of class "all_subset" is a data frame containing the following components:

References

Mendenhall William and Sinsich Terry, 2012, A Second Course in Statistics Regression Analysis (7th edition). Prentice Hall

Examples

model <- lm(mpg ~ disp + hp, data = mtcars) all_subset(model)
#> Index N Predictors R-Square Adj. R-Square Mallow's Cp #> 1 1 1 disp 0.718 0.709 4.4438 #> 2 2 1 hp 0.602 0.589 17.7949 #> 3 3 2 disp hp 0.748 0.731 3