View source: R/s3_methods_bma.R
| plot.badp_bma | R Documentation |
Plot method for objects of class badp_bma.
## S3 method for class 'badp_bma'
plot(
x,
which = c("model_sizes", "model_pmp", "best_models", "jointness", "coef_hist",
"posterior_dens"),
...
)
x |
An object of class |
which |
Character string specifying which plot to create. Options are:
|
... |
Additional arguments passed to the underlying plot function. |
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.
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.
bma, model_sizes, best_models,
jointness, coef_hist, posterior_dens,
model_pmp
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")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.