baggr_plot {baggr} | R Documentation |
Plotting method in baggr package
Description
Extracts study effects from the baggr
model and plots them,
possibly next to the hypereffect estimate.
Usage
baggr_plot(
bg,
hyper = FALSE,
style = c("intervals", "areas", "forest_plot"),
transform = NULL,
prob = 0.5,
prob_outer = 0.95,
vline = TRUE,
order = TRUE,
values_outer = TRUE,
values_size = 4,
values_digits = 1,
...
)
Arguments
bg |
object of class |
hyper |
logical; show hypereffect as the last row of the plot?
alternatively you can pass colour for the hypermean row,
e.g. |
style |
|
transform |
a function (e.g. |
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? |
values_outer |
logical; use the interval corresponding to |
values_size |
size of the text values in the plot when |
values_digits |
number of significant digits to use when |
... |
extra arguments to pass to the |
Value
ggplot2 object
Author(s)
Witold Wiecek; the visual style is based on bayesplot package
See Also
bayesplot::MCMC-intervals for more information about bayesplot functionality;
forest_plot for a typical meta-analysis alternative (which you can imitate using style = "forest_plot"
);
effect_plot for plotting treatment effects for a new group
Examples
fit <- baggr(schools, pooling = "none")
plot(fit, hyper = "red")
plot(fit, style = "areas", order = FALSE)
plot(fit, style = "forest_plot", order = FALSE)