plot.ssvs_mi: Plot SSVS-MI Estimates and Marginal Inclusion Probabilities...

View source: R/plot_MI.R

plot.ssvs_miR Documentation

Plot SSVS-MI Estimates and Marginal Inclusion Probabilities (MIP)

Description

This function creates a plot of SSVS-MI estimates with minimum and maximum and a plot for marginal inclusion probabilities (MIP) optional thresholds for highlighting significant predictors..

Usage

## S3 method for class 'ssvs_mi'
plot(
  x,
  type = "both",
  threshold = 0.5,
  legend = TRUE,
  est_title = NULL,
  mip_title = NULL,
  color = TRUE,
  ...
)

Arguments

x

An ssvs result object obtained from ssvs_mi()

type

Defaults to "both", can change to "estimate" or "MIP".

threshold

A numeric value (between 0 and 1) specifying the MIP threshold to highlight significant predictors. Defaults to 0.5.

legend

Logical indicating whether to include a legend for the threshold. Defaults to TRUE.

est_title

A character string specifying the plot title. Defaults to "SSVS-MI estimates".

mip_title

A character string specifying the plot title. Defaults to "Multiple Inclusion Probability for SSVS-MI".

color

Logical indicating whether to use color to highlight thresholds. Defaults to TRUE.

...

Ignored

Value

Two ggplot2 objects representing the plot of SSVS estimates and the plot of MIP with thresholds.

Examples


data(imputed_mtcars)
outcome <- 'qsec'
predictors <- c('cyl', 'disp', 'hp', 'drat', 'wt', 'vs', 'am', 'gear', 'carb','mpg')
imputation <- '.imp'
results <- ssvs_mi(data = imputed_mtcars, y = outcome, x = predictors, imp = imputation)
plot(results)


sabainter/SSVS documentation built on April 17, 2025, 12:48 p.m.