image.lmSubsets {lmSubsets} | R Documentation |
Heatmap of a subset regression
Description
Plot a heatmap of the specified submodels.
Usage
## S3 method for class 'lmSubsets'
image(x, size = NULL, best = 1, which = NULL, hilite, hilite_penalty,
main, sub, xlab = NULL, ylab, ann = par("ann"), axes = TRUE,
col = c("gray40", "gray90"), lab = "lab",
col_hilite = cbind("red", "pink"), lab_hilite = "lab",
pad_size = 3, pad_best = 1, pad_which = 3, axis_pos = -4,
axis_tck = -4, axis_lab = -10, ...)
## S3 method for class 'lmSelect'
image(x, best = NULL, which = NULL, hilite, hilite_penalty,
main, sub = NULL, xlab = NULL, ylab, ann = par("ann"),
axes = TRUE, col = c("gray40", "gray90"), lab = "lab",
col_hilite = cbind("red", "pink"), lab_hilite = "lab",
pad_best = 2, pad_which = 2, axis_pos = -4, axis_tck = -4,
axis_lab = -10, ...)
Arguments
x |
|
size , best |
submodels to be plotted |
which |
regressors to be plotted |
hilite , hilite_penalty |
submodels to be highlighted |
main , sub , xlab , ylab |
main, sub-, and axis titles |
ann |
annotate plot |
axes |
plot axes |
col , lab |
color and label style |
col_hilite , lab_hilite |
highlighting style |
pad_size , pad_best , pad_which |
padding |
axis_pos , axis_tck , axis_lab |
position of axes, tick length, and position of labels |
... |
ignored |
Value
invisible(x)
See Also
lmSubsets()
for all-subsets regressionlmSelect()
for best-subset regression
Examples
## data
data("AirPollution", package = "lmSubsets")
#################
## lmSubsets ##
#################
lm_all <- lmSubsets(mortality ~ ., data = AirPollution, nbest = 20)
## heatmap
image(lm_all, best = 1:3)
## highlight 5 best (BIC)
image(lm_all, best = 1:3, hilite = 1:5, hilite_penalty = "BIC")
################
## lmSelect ##
################
## default criterion: BIC
lm_best <- lmSelect(lm_all)
## highlight 5 best (AIC)
image(lm_best, hilite = 1:5, hilite_penalty = "AIC")
## axis labels
image(lm_best, lab = c("bold(lab)", "lab"), hilite = 1,
lab_hilite = "underline(lab)")
[Package lmSubsets version 0.5-2 Index]