Learn R Programming

baggr (version 0.8)

Bayesian Aggregate Treatment Effects

Description

Running and comparing meta-analyses of data with hierarchical Bayesian models in Stan, including convenience functions for formatting data, plotting and pooling measures specific to meta-analysis. This implements many models from Meager (2019) .

Copy Link

Version

Install

install.packages('baggr')

Monthly Downloads

349

Version

0.8

License

GPL (>= 3)

Issues

Pull Requests

Stars

Forks

Maintainer

Witold Wiecek

Last Published

February 10th, 2026

Functions in baggr (0.8)

plot.baggr

Plotting method for baggr outputs
microcredit

7 studies on effect of microcredit supply
print.compare_baggr_cv

Print baggr_cv comparisons
loo_compare

Compare LOO CV models
loocv

Leave one group out cross-validation for baggr models
effect_draw

Make predictive draws from baggr model
print_dist

Output a distribution as a string
mint

"Mean and interval" function, including other summaries, calculated for matrix (by column) or vector
mutau_cor

Correlation between mu and tau in a baggr model
treatment_effect

Average treatment effects in a baggr model
yusuf

Yusuf et al: beta-blockers and heart attacks
plot.baggr_cv

Plotting method for results of baggr LOO analyses
single_comp_plot

Plot single comparison ggplot in baggr_compare style
print.baggr_compare

Print method for baggr_compare models
print.baggr_cv

Print baggr cv objects nicely
plot_quantiles

plot quantiles
set_prior_val

Add prior values to Stan input for baggr
print.baggr

S3 print method for objects of class baggr (model fits)
prepare_prior

Prepare prior values for Stan models in baggr
pooling

Pooling metrics and related statistics for baggr
microcredit_simplified

Simplified version of the microcredit dataset.
priors

Prior distributions in baggr
plot.baggr_compare

Plot method for baggr_compare models
schools

8 schools example
prepare_ma

Convert individual- to summary-level data in meta-analyses
random_effects

Extract only random (treatment) effects from a baggr model
selection

Relative publication probabilities of a baggr model
bubble

Bubble plots for meta-regression models
baggr_theme_set

Set, get, and replace themes for baggr plots
chicks

Chickens: impact of electromagnetic field on calcium ion efflux in chicken brains
baggr_compare

(Run and) compare multiple baggr models
binary_to_individual

Generate individual-level binary outcome data from an aggregate statistics
baggr

Bayesian aggregate treatment effects model
add_color_to_plot

Add colors to baggr plots
labbe

L'Abbe plot for binary data
funnel_plot

Funnel plots for baggr models
is.baggr_cv

Check if something is a baggr_cv object
convert_inputs

Convert inputs for baggr models
baggr_plot

Plotting method in baggr package
fixed_effects

Effects of covariates on outcome in baggr models
forest_plot

Draw a forest plot for a baggr model
effect_plot

Plot predictive draws from baggr model
baggr-package

baggr - a package for Bayesian meta-analysis
data_spike

Spike & slab example dataset
get_order

Separate out ordering so we can test directly
group_effects

Extract baggr study/group effects