regsubsets function in the statistic argument below) against subset size.subsets(object, ...)
## S3 method for class 'regsubsets':
subsets(object,
names=abbreviate(object$xnames, minlength = abbrev),
abbrev=1, min.size=1, max.size=length(names), legend,
statistic=c("bic", "cp", "adjr2", "rsq", "rss"),
las=par('las'), cex.subsets=1, ...)regsubsets object produced by the regsubsets function
in the object.1.TRUE to plot a legend of predictor names; defaults to TRUE if
abbreviations are computed for predictor names. The legend is placed on the
plot interactively with the mouse. By expanding the left or right plot margin, yo"bic", Bayes Information Criterion;
"cp", Mallows's $C_{p}$;
"adjr2", $R^{2}$ adjusted for degrees of freedom;
"rsq", unadjusted0, ticks labels are drawn parallel to the
axis; set to 1 for horizontal labels (see par).1.subsets.regsubsets and plot.NULL if the legend is TRUE; otherwise a data frame with the legend.regsubsetsif (interactive() && require(leaps)){
subsets(regsubsets(undercount ~ ., data=Ericksen))
}Run the code above in your browser using DataLab