powered by
Matrix interface to all-variable-subsets selection in ordinary linear regression.
# S3 method for matrix lmSubsets(formula, y, intercept = TRUE, ...)
"matrix"---the model matrix
"matrix"
double[]---the model response
double[]
logical---if FALSE, remove intercept term
logical
FALSE
forwarded to lmSubsets.default()
lmSubsets.default()
"lmSubsets"---an all-subsets regression
"lmSubsets"
This is a utility interface. Use the standard formula interface wherever possible.
lmSubsets() for the S3 generic
lmSubsets()
lmSubsets.default() for the standard formula interface
# 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