Learn R Programming

SSVS (version 2.1.0)

plot.ssvs: Plot results of an SSVS model

Description

Plot results of an SSVS model

Usage

# S3 method for ssvs
plot(x, threshold = 0.5, legend = TRUE, title = NULL, color = TRUE, ...)

Value

Creates a plot of the inclusion probabilities by variable

Arguments

x

An ssvs result object obtained from ssvs()

threshold

An MIP threshold to show on the plot, must be between 0-1. If NULL, no threshold is used.

legend

If TRUE, show a legend for the shapes based on the threshold. Ignored if threshold = NULL.

title

The title of the plot. Set to NULL to use a default title.

color

If TRUE, the data points will be colored based on the threshold.

...

Ignored

Examples

Run this code
# \donttest{
outcome <- "qsec"
predictors <- c("cyl", "disp", "hp", "drat", "wt", "vs", "am", "gear", "carb", "mpg")
results <- ssvs(x = predictors, y = outcome, data = mtcars, progress = FALSE)
plot(results)
# }

Run the code above in your browser using DataLab