refit.lmSubsets {lmSubsets} | R Documentation |
Refit a subset regression
Description
Fit the specified submodel and return the obtained "lm"
object.
Usage
## S3 method for class 'lmSubsets'
refit(object, size, best = 1, ...)
## S3 method for class 'lmSelect'
refit(object, best = 1, ...)
Arguments
object |
|
size |
|
best |
|
... |
ignored |
Value
"lm"
—the fitted model
See Also
lmSubsets()
for all-subsets regressionlmSelect()
for best-subset regressionrefit()
for the S3 generic
Examples
## load data
data("AirPollution", package = "lmSubsets")
## fit subsets
lm_all <- lmSubsets(mortality ~ ., data = AirPollution)
## refit best model
lm5 <- refit(lm_all, size = 5)
summary(lm5)
[Package lmSubsets version 0.5-2 Index]