Skip to contents

Prints a summary for objects of class summary.regsubsets or regsubsets (from the leaps package), showing model selection statistics for best subsets, including R-squared, adjusted R-squared, standard error of estimate, Mallows' Cp, and AIC.

Usage

# S3 method for class 'summary.regsubsets'
print(x, ...)

Arguments

x

An object of class summary.regsubsets or regsubsets.

...

Additional arguments (not currently used).

Details

The function prints the model call and a table summarizing the best models selected, including the number of predictors, R-squared, adjusted R-squared, standard error of estimate (SEE), Mallows' Cp, and included variables. If the input is a regsubsets object, it is converted to a summary with summary(). If not, the object is returned unmodified.

See also

Examples

if (FALSE) { # \dontrun{
library(leaps)
fit <- leaps::regsubsets(Fertility ~ ., data = swiss, nbest = 3)
print.summary.regsubsets(fit)
} # }