Learn R Programming

mixlm (version 1.4.0)

best.subsets: F-test based best subset selection.

Description

Adaptation of existing methods based on AIC/BIC.

Usage

best.subsets(model, nbest = 5, nvmax, digits, force.in = "NULL")

Value

No return, only print.

Arguments

model

object class lm to select effects from.

nbest

numeric indicating number of models to report of each size.

nvmax

numeric maximum size of subsets to examine.

digits

numeric giving number of digits in format of output.

force.in

character vector indicating effects to keep in all models.

Author

Kristian Hovde Liland

Details

F-based versions of built in subset method.

Examples

Run this code
data <- data.frame(y = rnorm(8),
				   x = factor(c('a','a','a','a','b','b','b','b')),
				   z = factor(c('a','a','b','b','a','a','b','b')))
mod <- lm(y ~ x + z, data=data)
best.subsets(mod)

Run the code above in your browser using DataLab