plot.baggr_compare: Plot method for baggr_compare models

View source: R/baggr_compare.R

plot.baggr_compareR Documentation

Plot method for baggr_compare models

Description

Allows plots that compare multiple baggr models that were passed for comparison purposes to baggr compare or run automatically by baggr_compare

Usage

## S3 method for class 'baggr_compare'
plot(
  x,
  compare = x$compare,
  style = "areas",
  grid_models = FALSE,
  grid_parameters = TRUE,
  prob = x$prob,
  hyper = TRUE,
  transform = NULL,
  order = F,
  vline = FALSE,
  add_values = FALSE,
  values_digits = 2,
  values_size = 2,
  ...
)

Arguments

x

baggr_compare model to plot

compare

When plotting, choose between comparison of "groups" (default), "hyperpars" (to omit group-specific estimates) or (predicted) "effects". The "groups" option is not available when what = "prior".

style

What kind of plot to display (if grid_models = TRUE), passed to the style argument in baggr_plot.

grid_models

If FALSE (default), generate a single comparison plot; if TRUE, display each model (using individual baggr_plot's) side-by-side.

grid_parameters

if TRUE, uses ggplot-style facetting when plotting models with many parameters (especially "quantiles", "sslab"); if FALSE, returns separate plot for each parameter

prob

Width of uncertainty interval (defaults to 95%)

hyper

Whether to plot pooled treatment effect in addition to group treatment effects when compare = "groups"

transform

a function (e.g. exp(), log()) to apply to the values of group (and hyper, if hyper=TRUE) effects before plotting

order

Whether to sort by median treatment effect by group. If yes, medians from the model with largest range of estimates are used for sorting. If not, groups are shown alphabetically.

vline

logical; show vertical line through 0 in the plot?

add_values

logical; if TRUE, values will be printed next to the plot, in a style that's similar to what is done for forest plots

values_digits

number of significant digits to use when printing values,

values_size

size of font for the values, if add_values == TRUE

...

ignored for now, may be used in the future


baggr documentation built on March 18, 2022, 7:02 p.m.