lmSelect.lmSubsets {lmSubsets} | R Documentation |
Best-subset regression
Description
Coerce an all-subsets regression.
Usage
## S3 method for class 'lmSubsets'
lmSelect(formula, penalty = "BIC", ...)
Arguments
formula |
|
penalty |
|
... |
ignored |
Details
Computes a best-subset regression from an all-subsets regression.
Value
"lmSelect"
—a best-subset regression
See Also
lmSelect()
for the S3 genericlmSubsets()
for all-subsets regression
Examples
data("AirPollution", package = "lmSubsets")
lm_all <- lmSubsets(mortality ~ ., data = AirPollution, nbest = 20)
lm_best <- lmSelect(lm_all)
lm_best
[Package lmSubsets version 0.5-2 Index]