lmSubsets.matrix {lmSubsets}R Documentation

All-subsets regression

Description

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

Usage

## S3 method for class '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()

Details

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

Value

"lmSubsets"—an all-subsets regression

See Also

Examples

data("AirPollution", package = "lmSubsets")

x <- as.matrix(AirPollution)

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

[Package lmSubsets version 0.5-2 Index]