regsubsets
function in the leaps
package finds
optimal subsets of predictors. This function plots a measure of fit
(see 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 leaps
package.object
."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
. This function is used for its side effect --
to create a plot.regsubsets
library(leaps)
subsets(regsubsets(undercount ~ ., data=Ericksen))
Run the code above in your browser using DataLab