plot.badp_bma: Plot Bayesian Model Averaging Results

View source: R/s3_methods_bma.R

plot.badp_bmaR Documentation

Plot Bayesian Model Averaging Results

Description

Plot method for objects of class badp_bma.

Usage

## S3 method for class 'badp_bma'
plot(
  x,
  which = c("model_sizes", "model_pmp", "best_models", "jointness", "coef_hist",
    "posterior_dens"),
  ...
)

Arguments

x

An object of class badp_bma, typically the result of bma.

which

Character string specifying which plot to create. Options are:

  • "model_sizes" - Model size distributions (default)

  • "best_models" - Best models

  • "jointness" - Jointness analysis

  • "coef_hist" - Coefficient histograms

  • "posterior_dens" - Posterior densities

  • "model_pmp" - Model posterior probabilities

...

Additional arguments passed to the underlying plot function.

Details

This function dispatches to the appropriate visualization function based on the which parameter. The default plot shows model size distributions, which provides a comprehensive overview of the prior and posterior distributions over model sizes.

With which = "best_models" two functions are involved, best_models to select the models and plot.badp_best_models to draw them, and the arguments in ... are split between them by name: prior, best and round are passed to the first, robust to the second. The table drawn is the one of estimates; for the inclusion table call plot(best_models(x), which = "inclusion") directly, since which is taken here by the choice of plot.

Value

Invisibly returns the object produced by the selected helper. The figure or table is drawn to the active device as a side effect, so a single call draws exactly one graphic.

See Also

bma, model_sizes, best_models, jointness, coef_hist, posterior_dens, model_pmp

Examples


data(full_model_space)
results <- bma(full_model_space)

# Default plot (model sizes)
plot(results)

# Other plot types
plot(results, which = "best_models")
plot(results, which = "jointness")



badp documentation built on Sept. 15, 2026, 1:08 a.m.