lmSubsets (version 0.5-2)

lmSubsets.matrix: All-subsets regression

Description

Matrix interface to all-variable-subsets selection in ordinary linear regression.

Usage

# S3 method for matrix
lmSubsets(formula, y, intercept = TRUE, ...)

Arguments

formula

"matrix"---the model matrix

y

double[]---the model response

intercept

logical---if FALSE, remove intercept term

...

forwarded to lmSubsets.default()

Value

"lmSubsets"---an all-subsets regression

Details

This is a utility interface. Use the standard formula interface wherever possible.

See Also

Examples

Run this code
# NOT RUN {
data("AirPollution", package = "lmSubsets")

x <- as.matrix(AirPollution)

lm_mat <- lmSubsets(x, y = "mortality")
lm_mat
# }

Run the code above in your browser using DataLab