Summary method for a `leaps' object

Usage

summary.leaps(ll, all.best=TRUE, matrix=T, matrix.logical=F, show=T, df=NULL)

Arguments

ll "leaps" object such as returned by subsets
all.best Report all best subsets or just one of each size
matrix Show a matrix indicating which variables are in the model
matrix.logical Use T/F rather than "*" " " in the matrix
show print results
df Number to use instead of number of observations in calculating model choice statistics

Description

Displays the best subsets found by subsets() and returns a logical matrix indicating which variables are in each subset and a collection of popular model choice statistics.

Value

A list with components
which logical matrix indicating which variables are in each subset
rss Residual sum of squares for each subset
rsq R-squared for each subset
adjr2 Adjusted R-squared for each subset
cp Cp for each subset
bic Bayesian Information Criterion for each subset

Warning

The R-squared, Cp and adjusted R-squared are well-known to be useless for model choice after this sort of search. They may be useful for calculating other quantities of interest.

References

Alan Miller "Subset Selection in Regression" Chapman & Hall

See Also

subsets

Examples

data(swiss)
a<-subsets(as.matrix(swiss[,-1]),swiss[,1])
b<-summary(a)


[Package Contents]