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

"lmSubsets"—an all-subsets regression

penalty

double, character, "function"—penalty per model parameter

...

ignored

Details

Computes a best-subset regression from an all-subsets regression.

Value

"lmSelect"—a best-subset regression

See Also

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]