Brief Introduction
- Data used: Boston data from MASS
- Package: plotly for plotting data; leaps for regsubsets function.
Jan 28, 2018
Function: regsubsets
- regsubsets finds the best model for each number of predictors
- method is either forwards, backwards, or exhaustive (best subset selection) - here I tested the best subset selection method
b <- summary(a) noquote(b$outmat)
## zn indus chas nox rm age dis rad tax ptratio black lstat medv ## 1 ( 1 ) * ## 2 ( 1 ) * * ## 3 ( 1 ) * * * ## 4 ( 1 ) * * * * ## 5 ( 1 ) * * * * * ## 6 ( 1 ) * * * * * * ## 7 ( 1 ) * * * * * * * ## 8 ( 1 ) * * * * * * * * ## 9 ( 1 ) * * * * * * * * * ## 10 ( 1 ) * * * * * * * * * * ## 11 ( 1 ) * * * * * * * * * * * ## 12 ( 1 ) * * * * * * * * * * * * ## 13 ( 1 ) * * * * * * * * * * * * *