Bayesian Aggregate Treatment Effects
Overview
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.
Functionality:
- Improved funnel plot function
- Faster logit model via bernoulli_logit_glm
- Added predict.baggr() alias
Documentation:
- Added a vignette
baggr_selectionthat has examples of how to do selection models
Fixes:
- Fix to selection model: I did marginalisation of likelihood wrong and the previous results were biased towards the "uncorrected" hypermeans in presence of heterogeneity.
- Fixed some inconsistencies in how predicted effects were handled in models with individual-level data (with covariates that change within study)
- Fixed some bugs in predictive density calculations in cross-validation
Show all changes in 0.8.2Hide the rest of the changes in 0.8.2
- Specification of prior for sigma (SD) in rubin_full model
- Log-predictive density for "mu & tau" model was wrong; new version relies on multivariate
From NEWS.md in the release
Install
Health
NOTER code for possible problemsr-devel-linux-x86_64-debian-clang, r-devel-linux-x86_64-debian-gcc, r-devel-linux-x86_64-fedora-clang, r-devel-linux-x86_64-fedora-gcc, r-devel-windows-x86_64
Found calls to structure() using deprecated special names: baggr/tests/testthat/test_loo.R (.Dim: 2, .Dimnames: 2) baggr/tests/testthat/test_ordering.R (.Label: 1) '.Dim' should be changed to 'dim'. '.Dimnames' should be changed to 'dimnames'. '.Label' should be changed to 'levels'.
- NOTE8 OK, 5 NOTENow
- NOTE9 OK, 4 NOTE2026-07-29
- ERROR9 OK, 3 NOTE, 1 ERROR2026-07-27
- NOTE11 OK, 2 NOTE2026-07-16
- OK12 OK2026-04-25
- NOTE11 OK, 3 NOTE2026-04-22
Show 2 earlier changesHide 2 earlier changes
- ERROR10 OK, 3 NOTE, 1 ERROR2026-04-18
- NOTE11 OK, 3 NOTE2026-03-10
Documentation
- Help pages
- 48 (1 internal)includes a package overview page
- Examples that run
- 75%12 run in a plain check · 1 only when donttest examples are enabled (R CMD check --as-cran) · 3 never run
- Exported functions with examples
- 62%
- Documented parameters
- 100%
- Return-value docs
- 77%
- Help pages citing references
- 23%
Downloads
Repository
- PRs merged (all time)
- 73%
- Median days to close, 50 most recently updated closed issues
- 1,093
- Median days to close, 50 most recently updated closed PRs
- 0
Stars over time
Forks over time
Releases over time
Issues over time
PRs over time
6 development-tooling and community-health practices detected across 5 families in the upstream repository
Checks run against github.com/wwiecek/baggr on 2026-10-18.
The R CMD check workflow runs on Linux, macOS and Windows, and on R-devel
Show all practicesHide 1 practice
This repository shows signs of AI coding tools.
- Codexfirst seen 2025-11-19Pull request it wrote: opened by a project member
Dependencies
Code & Tests
Datasets
People & History
Pick two releases to compare their code metrics.
- 0.8.2Latest
- RR 4.6.0 released · 2026-04-24
- 0.8
- 0.7.112025-06-19 · diff ↗
- RR 4.5.0 released · 2025-04-11
- RR 4.4.0 released · 2024-04-24
- 0.7.8
- RR 4.3.0 released · 2023-04-21
- 0.7.62023-03-22 · diff ↗
- 0.7.42023-01-06 · diff ↗
- RR 4.2.0 released · 2022-04-22
- 0.6.21
- 0.6.18
- 0.6.9
- RR 4.1.0 released · 2021-05-18
- 0.6.42021-05-12 · diff ↗ ·
removed 1 export
show_modeladded 5 exports
binary_to_individual, labbe, plot_quantiles, random_effects, summarise_quantiles_data
Show 6 earlier eventsHide 6 earlier events
- RR 4.0.0 released · 2020-04-24
- 0.4.0
- 0.3.02020-01-08 · diff ↗ ·
added 8 exports
baggr_theme_get, baggr_theme_replace, baggr_theme_set, baggr_theme_update, forest_plot, heterogeneity, loo_compare, mint - 0.2.02019-10-29 · diff ↗ ·
added 8 exports
cauchy, effect_draw, effect_plot, lkj, multinormal, normal, pooling, uniform - 0.1.02019-08-01
- RR 3.6.0 released · 2019-04-26
Package metadata
- First published
- 2019-08-01
- Total releases
- 14 / 7 yrs
- License
- GPL (>= 3) OSI
- Minimum R
- ≥ 3.5.0
- Bundled data
- 558 KB / 7 files
- Download size
- 3.0 MB
Cite
Cite this package
Run in R for the authors' preferred citation:
citation("baggr")This package has no citation file, so citation() returns this entry built from DESCRIPTION.
Cite the R Observatory
For a number measured here: a download total, a coverage figure, an archival date.
From data release v2026-10-21, which the citation names so these numbers can be found later. More on citing and the projects behind them.