Package: baggr 0.8.2

Witold Wiecek

baggr: Bayesian Aggregate Treatment Effects

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) <doi:10.1257/app.20170299>.

Authors:Witold Wiecek [cre, aut], Rachael Meager [aut], Brice Green [ctb], Danny Toomey [ctb], Trustees of Columbia University [cph]

baggr_0.8.2.tar.gz
baggr_0.8.2.zip(r-4.7-x86_64)baggr_0.8.2.zip(r-4.7-arm64)baggr_0.8.2.zip(r-4.6-x86_64)baggr_0.8.2.zip(r-4.6-arm64)baggr_0.8.2.zip(r-4.5-x86_64)
baggr_0.8.2.tgz(r-4.6-x86_64)baggr_0.8.2.tgz(r-4.6-arm64)baggr_0.8.2.tgz(r-4.5-x86_64)baggr_0.8.2.tgz(r-4.5-arm64)
baggr_0.8.2.tar.gz(r-4.7-arm64)baggr_0.8.2.tar.gz(r-4.7-x86_64)baggr_0.8.2.tar.gz(r-4.6-arm64)baggr_0.8.2.tar.gz(r-4.6-x86_64)
baggr_0.8.2.tgz(r-4.6-emscripten)
manual.pdf |manual.html✨
DESCRIPTION |NEWS
card.svg |card.png
baggr/json (API)

# Install 'baggr' in R:
install.packages('baggr', repos = c('https://cranhaven.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/wwiecek/baggr/issues

Uses libs:
  • onetbb– Parallelism library for C++
  • c++– GNU Standard C++ Library v3
Datasets:
  • chicks - Chickens: impact of electromagnetic field on calcium ion efflux in chicken brains
  • data_spike - Spike & slab example dataset
  • microcredit - 7 studies on effect of microcredit supply
  • microcredit_simplified - Simplified version of the microcredit dataset.
  • schools - 8 schools example
  • vitamin_a - Vitamin A supplementation and child mortality
  • yusuf - Yusuf et al: beta-blockers and heart attacks

On CRAN:

Conda:

archivedpackagesr-universeonetbbcpp

4.26 score 5 stars 120 scripts 543 downloads 40 exports 69 dependencies

Last updated from:151ff88142 (on package/baggr). Checks:2 ERROR, 3 NOTE, 10 OK. Indexed: no.

TargetResultTimeFilesSyslog
linux-devel-arm64ERROR483
linux-devel-x86_64NOTE572
source / vignettesOK835
linux-release-arm64ERROR476
linux-release-x86_64OK588
macos-release-arm64OK497
macos-release-x86_64OK975
macos-oldrel-arm64OK607
macos-oldrel-x86_64OK784
windows-devel-arm64NOTE583
windows-devel-x86_64NOTE499
windows-release-arm64OK563
windows-release-x86_64OK731
windows-oldrel-x86_64OK497
wasm-releaseOK365

Exports:baggrbaggr_comparebaggr_plotbaggr_theme_getbaggr_theme_replacebaggr_theme_setbaggr_theme_updatebinary_to_individualbubblecauchyconvert_inputseffect_draweffect_plotfixed_effectsforest_plotfunnelfunnel_plotgroup_effectsheterogeneityhypermeanhypersdlabbelkjlognormalloo_compareloocvmintmultinormalmutau_cornormalplot_quantilespoolingprepare_marandom_effectsselectionsingle_comp_plotstudent_tstudy_effectstreatment_effectuniform

Dependencies:abindbackportsbayesplotBHcallrcheckmateclicpp11crayondescdigestdistributionaldplyrfarverforestplotfsgenericsggdistggplot2ggplotifyggrepelggridgesgluegridExtragridGraphicsgtableinlineisobandlabelinglifecycleloomagrittrmatrixStatsnumDerivotelpillarpkgbuildpkgconfigplyrposteriorprocessxpspurrrquadprogQuickJSRR6rappdirsRColorBrewerRcppRcppEigenRcppParallelreshape2rlangrstanrstantoolsS7scalesStanHeadersstringistringrtensorAtibbletidyrtidyselectutf8vctrsviridisLitewithryulab.utils

Aggregating Average Treatment Effects with baggr
What is baggr? | Recent features | Data inputs: reported effects or full individual-level data sets | ATE aggregation models in baggr | Rubin model | $\mu$-$\tau$ model | Individual-level models | Models, their inputs, hierarchy and priors: a summary table | Prior choice in baggr | Running the Rubin model in baggr | Examining treatment and study effects | Choosing priors | Understanding and criticising baggr model performance | Measuring "pooling" | Estimate of pooling in each group | Overall pooling (in the model) | Plotting and model comparison in baggr | Basic model comparison with baggr_compare | Comparing existing models, understanding impact of the prior | Forest plots for the models | Cross-validation in baggr | Publication bias assessment | References

Last update: 2026-11-01
Started: 2026-11-01

Meta-analysis of binary data with baggr
Other questions you should consider | Basic meta-analysis of binary data | Choice of summary statistic | Visual inspection of binary data | Using differences instead of ratios | Using risk ratios instead of odds ratios | Model comparison using a measure of model fit | Visualising and criticising model results | Model comparison | Model for individual-level binary data | When to use summary and when to use individual-level data | How to summarise individual-level data | Rare events | Pooling baseline event rates | Accounting for covariates: meta-regression and mixed models | References

Last update: 2026-11-01
Started: 2026-11-01

Publication bias and selection models with baggr
Data | Funnel plot | Selection adjustment | References

Last update: 2026-11-01
Started: 2026-11-01

Readme and manuals

Help Manual

Help pageTopics
Add colors to baggr plotsadd_color_to_plot
Bayesian aggregate treatment effects modelbaggr
(Run and) compare multiple baggr modelsbaggr_compare
Plotting method in baggr packagebaggr_plot
Set, get, and replace themes for baggr plotsbaggr_theme_get baggr_theme_replace baggr_theme_set baggr_theme_update
Generate individual-level binary outcome data from an aggregate statisticsbinary_to_individual
Bubble plots for meta-regression modelsbubble
Chickens: impact of electromagnetic field on calcium ion efflux in chicken brainschicks
Convert inputs for baggr modelsconvert_inputs
Spike & slab example datasetdata_spike
Make predictive draws from baggr modeleffect_draw
Plot predictive draws from baggr modeleffect_plot
Effects of covariates on outcome in baggr modelsfixed_effects
Draw a forest plot for a baggr modelforest_plot
Funnel plots for baggr modelsfunnel funnel_plot
Separate out ordering so we can test directlyget_order
Extract baggr study/group effectsgroup_effects study_effects
Check if something is a baggr_cv objectis.baggr_cv
L'Abbe plot for binary datalabbe
Compare LOO CV modelsloo_compare
Leave one group out cross-validation for 'baggr' modelsloocv
7 studies on effect of microcredit supplymicrocredit
Simplified version of the microcredit dataset.microcredit_simplified
"Mean and interval" function, including other summaries, calculated for matrix (by column) or vectormint
Correlation between mu and tau in a baggr modelmutau_cor
plot quantilesplot_quantiles
Plotting method for baggr outputsplot.baggr
Plot method for baggr_compare modelsplot.baggr_compare
Plotting method for results of baggr LOO analysesplot.baggr_cv
Pooling metrics and related statistics for baggrheterogeneity pooling weights.baggr
Predict treatment effects from baggr modelpredict.baggr
Convert individual- to summary-level data in meta-analysesprepare_ma
Prepare prior values for Stan models in baggrprepare_prior
Output a distribution as a stringprint_dist
S3 print method for objects of class 'baggr' (model fits)print.baggr
Print method for baggr_compare modelsprint.baggr_compare
Print baggr cv objects nicelyprint.baggr_cv
Print baggr_cv comparisonsprint.compare_baggr_cv
Prior distributions in baggrcauchy lkj lognormal multinormal normal priors student_t uniform
Extract only random (treatment) effects from a baggr modelrandom_effects
8 schools exampleschools
Relative publication probabilities of a baggr modelselection
Add prior values to Stan input for baggrset_prior_val
Plot single comparison ggplot in 'baggr_compare' stylesingle_comp_plot
Average treatment effects in a baggr modelhypermean hypersd treatment_effect
Vitamin A supplementation and child mortalityvitamin_a
Yusuf et al: beta-blockers and heart attacksyusuf