shrinkr: Modular Bayesian Hierarchical Shrinkage Models

Implements a two-stage Bayesian hierarchical modeling framework for applying shrinkage to subgroup-specific effects. The package separates model fitting (Stage 1) from hierarchical shrinkage (Stage 2), enabling modular sensitivity analyses without refitting expensive Markov chain Monte Carlo (MCMC) chains. Supports flexible prior specifications through the 'distributional' package, mixture approximations via 'mclust', and efficient 'Stan'-based inference.

Version: 0.4.5
Depends: R (≥ 4.1)
Imports: rstan (≥ 2.32.7), mclust, posterior, distributional, cli, tibble, dplyr, purrr, stats, utils, methods, Rcpp (≥ 0.12.0), RcppParallel (≥ 5.0.1), rstantools (≥ 2.5.0)
LinkingTo: BH (≥ 1.66.0), Rcpp (≥ 0.12.0), RcppEigen (≥ 0.3.3.3.0), RcppParallel (≥ 5.0.1), rstan (≥ 2.32.7), StanHeaders (≥ 2.32.10)
Suggests: testthat (≥ 3.0.0), ggplot2, knitr, rmarkdown, patchwork, tidybayes, bayesplot, tidyverse, ggdist, ggridges, brms, tidyr, survival, MASS, Matrix, beastt
Published: 2026-07-06
DOI: 10.32614/CRAN.package.shrinkr (may not be active yet)
Author: Jacob M. Maronge ORCID iD [aut, cre], GlaxoSmithKline Research & Development Limited [cph, fnd], Trustees of Columbia University [cph] (R/stanmodels.R, configure, configure.win)
Maintainer: Jacob M. Maronge <jacob.m.maronge at gsk.com>
BugReports: https://github.com/GSK-Biostatistics/shrinkr/issues
License: GPL (≥ 3)
URL: https://gsk-biostatistics.github.io/shrinkr/
NeedsCompilation: yes
SystemRequirements: GNU make, C++17 compiler
Materials: README, NEWS
CRAN checks: shrinkr results

Documentation:

Reference manual: shrinkr.html , shrinkr.pdf
Vignettes: Survival Analysis with brms and shrinkr (source, R code)
Federated Learning with shrinkr (source, R code)
Getting Started with shrinkr (source, R code)
Meta-Analytic-Predictive (MAP) Priors with shrinkr and beastt (source, R code)
Working with shrinkr in the Tidy Bayesian Ecosystem (source, R code)

Downloads:

Package source: shrinkr_0.4.5.tar.gz
Windows binaries: r-devel: not available, r-release: not available, r-oldrel: not available
macOS binaries: r-release (arm64): shrinkr_0.4.5.tgz, r-oldrel (arm64): shrinkr_0.4.5.tgz, r-release (x86_64): not available, r-oldrel (x86_64): shrinkr_0.4.5.tgz

Linking:

Please use the canonical form https://CRAN.R-project.org/package=shrinkr to link to this page.