Learn R Programming

baggr (version 0.2.0)

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, mean = FALSE, style = "intervals", prob = 0.5,
  prob_outer = 0.95, vline = TRUE, order = TRUE, ...)

Arguments

bg

object of class baggr

mean

logical; plot mean treatment effect alongside individual study effects?

style

one of areas, intervals

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

See Also

bayesplot::MCMC-intervals

Examples

Run this code
# NOT RUN {
fit <- baggr(schools, pooling = "none")
plot(fit)
plot(fit, style = "areas", order = FALSE)

# }

Run the code above in your browser using DataLab