baggr_plot {baggr}R Documentation

Plotting method in baggr package

Description

Extracts study effects from the baggr model and sends them to one of bayesplot package plotting functions.

Usage

baggr_plot(
  bg,
  hyper = FALSE,
  style = "intervals",
  transform = NULL,
  prob = 0.5,
  prob_outer = 0.95,
  vline = FALSE,
  order = TRUE,
  ...
)

Arguments

bg

object of class baggr

hyper

logical; show hypereffect as the last row of the plot?

style

one of areas, intervals

transform

a function (e.g. exp(), log()) to apply to the values of group (and hyper, if hyper=TRUE) effects before plotting; when working with effects that are on log scale, exponent transform is used automatically, you can plot on log scale by setting transform = identity

prob

Probability mass for the inner interval in visualisation

prob_outer

Probability mass for the outer interval in visualisation

vline

logical; show vertical line through 0 in the plot?

order

logical; sort groups by magnitude of treatment effect?

...

extra arguments to pass to the bayesplot functions

Value

ggplot2 object

Author(s)

Witold Wiecek, Rachael Meager

See Also

bayesplot::MCMC-intervals for more information about bayesplot functionality; forest_plot for a typical meta-analysis alternative; effect_plot for plotting treatment effects for a new group

Examples

fit <- baggr(schools, pooling = "none")
plot(fit)
plot(fit, style = "areas", order = FALSE)


[Package baggr version 0.6.4 Index]