Description Usage Arguments Details Value See Also Examples
Summary methods for objects of class lmSubsets
and
lmSelect
.
1 2 3 4 |
object |
An object of class |
penalty |
Penalty per parameter. |
... |
Ignored. |
The summary
methods for lmSubsets
and lmSelect
objects evaluate the AIC given the desired penalty
for all
computed submodels.
An object of class summary.lmSubsets
or
summary.lmSelect
.
lmSubsets
, methods.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | ## load data
data("AirPollution", package = "lmSubsets")
## fit all subsets
all.AirPoll <- lmSubsets(mortality ~ ., data = AirPollution, nbest = 10)
## summarize (AIC)
summary(all.AirPoll, penalty = "AIC")
## fit best subsets (BIC)
best.AirPoll <- lmSelect(mortality ~ ., data = AirPollution, nbest = 10)
## summarize
summary(best.AirPoll, penalty = list("AIC", 3, "BIC", 5))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.