baggr_plot | R Documentation |
Extracts study effects from the baggr
model and plots them,
possibly next to the hypereffect estimate.
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,
...
)
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 |
ggplot2 object
Witold Wiecek; the visual style is based on bayesplot package
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
fit <- baggr(schools, pooling = "none")
plot(fit, hyper = "red")
plot(fit, style = "areas", order = FALSE)
plot(fit, style = "forest_plot", order = FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.