boxplot.BranchGLMVI.boot: Box Plot Method for BranchGLMVI.boot Objects

View source: R/VariableImportance.boot.R

boxplot.BranchGLMVI.bootR Documentation

Box Plot Method for BranchGLMVI.boot Objects

Description

Creates box-and-whisker plots of approximate null distributions for the modified variable importance values.

Usage

## S3 method for class 'BranchGLMVI.boot'
boxplot(
  x,
  which = "all",
  linecol = "red",
  linelwd = 2,
  horizontal = TRUE,
  lim = NULL,
  show.names = TRUE,
  lab = "Modified Variable Importance",
  main = NULL,
  las = ifelse(horizontal, 1, 2),
  ...
)

Arguments

x

a BranchGLMVI.boot object.

which

which approximate null distributions to plot, can use a numeric vector of indices, a character vector of names, or "all" for all variables. The default is to create box-and-whisker plots for each set of variables that are not kept in each model.

linecol

the color of the line which indicates the observed modified variable importance values.

linelwd

the width of the line which indicates the observed modified variable importance values.

horizontal

a logical value indicating if the boxplots should be horizontal.

lim

a numeric vector of length 2, giving the coordinates range.

show.names

set to TRUE or FALSE to override the defaults on whether an axis label is printed for each group.

lab

a label for the axis corresponding to the modified variable importance values.

main

a main title for the plot.

las

the style of axis labels, see more at par.

...

further arguments passed to boxplot.default.

Value

This only produces a plot, nothing is returned.

See Also

hist.BranchGLMVI.boot

Examples

Data <- iris
Fit <- BranchGLM(Sepal.Length ~ ., data = Data, family = "gaussian", link = "identity")

# Doing branch and bound selection 
VS <- VariableSelection(Fit, type = "branch and bound", metric = "BIC", 
showprogress = FALSE)

# Getting approximate null distributions
set.seed(40174)
myBoot <- VariableImportance.boot(VS, showprogress =  FALSE)

# Plotting boxplots of selected sets of variables
oldmar <- par("mar")
par(mar = c(4, 6, 3, 1) + 0.1)
boxplot(myBoot, las = 1)
par(mar = oldmar)

# Plotting boxplots of selected sets of variables
boxplot(myBoot, las = 1, cex.axis = 0.55)


BranchGLM documentation built on Sept. 28, 2024, 9:07 a.m.