Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

baggr_plot

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 = TRUE,
  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)

baggr

Bayesian Aggregate Treatment Effects

v0.4.0
GPL (>= 3)
Authors
Witold Wiecek [cre, aut], Rachael Meager [aut], Brice Green [ctb] (predict(), loo_compare, many visuals), Trustees of Columbia University [cph] (tools/make_cc.R)
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.