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="interactive",
statistic=c("bic", "cp", "adjr2", "rsq", "rss"),
las=par('las'), cex.subsets=1, ...)regsubsets object produced by the regsubsets function
in the object.1.FALSE, in which case the legend is suppressed,
the coordinates at which to place a legend of the abbreviated predictor names on the plot,
in a form recognized by
the legend"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 (require(leaps)){
subsets(regsubsets(undercount ~ ., data=Ericksen),
legend=c(3.5, -37))
}Run the code above in your browser using DataLab