powered by
Produces the best linear model for a specific number of predictors in a subset selection.
lmSub(object, d)
The best linear model with d predictors
d
An object of type "regsubsets"
Number of data predictors
subs=leaps::regsubsets(mpg~.,mtcars) summary(lmSub(subs,3))
Run the code above in your browser using DataLab