Description Usage Arguments Value See Also Examples
Plot the deviance of the selected submodels, as well as a specified information criterion.
1 2 3 4 5 6 7 8 9 10 11 12 | ## S3 method for class 'lmSubsets'
plot(x, penalty = "BIC", xlim, ylim_rss, ylim_ic, type_rss = "o",
type_ic = "o", main, sub, xlab, ylab_rss, ylab_ic, legend_rss,
legend_ic, ann = par("ann"), axes = TRUE, lty_rss = c(1, 3),
pch_rss = c(16, 21), col_rss = "black", bg_rss = "white",
lty_ic = c(1, 3), pch_ic = c(16, 21), col_ic = "red",
bg_ic = "white", ...)
## S3 method for class 'lmSelect'
plot(x, xlim, ylim, type = "o", main, sub, xlab, ylab, legend,
ann = par("ann"), axes = TRUE, lty = 1, pch = 16, col = "red",
bg = "white", ...)
|
x |
|
penalty |
the information criterion |
xlim, ylim, ylim_rss, ylim_ic |
x and y limits |
type, type_rss, type_ic |
type of plot |
main, sub |
main and sub-title |
xlab, ylab, ylab_rss, ylab_ic |
axis titles |
legend, legend_rss, legend_ic |
plot legend |
ann |
annotate plot |
axes |
plot axes |
lty, lty_rss, lty_ic |
line type |
pch, pch_rss, pch_ic |
plotting character |
col, col_rss, col_ic |
color |
bg, bg_rss, bg_ic |
background color |
... |
further graphical parameters |
invisible(x)
lmSubsets()
for all-subsets
regression
lmSelect()
for best-subset
regression
plot()
for the S3 generic
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | ## load data
data("AirPollution", package = "lmSubsets")
#################
## lmSubsets ##
#################
lm_all <- lmSubsets(mortality ~ ., data = AirPollution, nbest = 5)
plot(lm_all)
################
## lmSelect ##
################
lm_best <- lmSelect(mortality ~ ., data = AirPollution, nbest = 20)
plot(lm_best)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.