Bayesian Applied Regression Modeling via Stan
Overview
Estimates previously compiled regression models using the 'rstan' package, which provides the R interface to the Stan C++ library for Bayesian estimation. Users specify models via the customary R syntax with a formula and data.frame plus some additional arguments for priors.
Install
Health
- OK13 OK2026-08-04
- NOTE12 OK, 1 NOTE2026-08-01
- OK13 OK2026-07-29
- ERROR12 OK, 1 ERROR2026-07-27
- OK13 OK2026-06-23
Show 7 earlier changesHide 7 earlier changes
- ERROR12 OK, 1 ERROR2026-06-20
- OK13 OK2026-06-09
- ERROR12 OK, 1 ERROR2026-06-07
- OK12 OK2026-04-25
- NOTE11 OK, 3 NOTE2026-04-22
- ERROR10 OK, 3 NOTE, 1 ERROR2026-04-18
- NOTE11 OK, 3 NOTE2026-03-10
Documentation
- Help pages
- 66 (12 internal)includes a package overview page
- Examples that run
- 100%41 run in a plain check
- Exported functions with examples
- 83%
- Documented parameters
- 73%
- Return-value docs
- 88%
- Help pages citing references
- 33%
Also includes 10 demo scripts (run with demo())
- How to Use the rstanarm Package
- Hierarchical Partial Pooling
- MRP with rstanarm
- Prior Distributions
- Probabilistic A/B Testing with rstanarm
- stan_aov: ANOVA Models
- stan_betareg: Models for Rate/Proportion Data
- stan_glm: GLMs for Binary and Binomial Data
- stan_glm: GLMs for Continuous Data
- stan_glm: GLMs for Count Data
Downloads
Repository
- PRs merged (all time)
- 86%
- Median days to close, 50 most recently updated closed issues
- 100
- Median days to close, 50 most recently updated closed PRs
- 5
Stars over time
Forks over time
Releases over time
Issues over time
PRs over time
Commits over time
Commit identities over time
10 development-tooling and community-health practices detected across 5 families in the upstream repository
Checks run against github.com/stan-dev/rstanarm on 2026-10-11.
The R CMD check workflow runs on Linux, macOS and Windows
Funding links: GitHub Sponsors, mc-stan.org
The repository owner accepts GitHub Sponsors
GitHub Pages site last deployed 2026-09-28 · The repository has a site deploy workflow
pkgdown site last built 2026-09-28
Show all practicesHide 1 practice
Dependencies
Installing rstanarm adds 111 packages (56 with compiled code, 114 MB of source tarballs). Heaviest: BH 14 MB, stringi 11 MB, ggplot2 6.0 MB.
Show the 48 most downloaded packagesHide the 48 most downloaded packages
Code & Tests
Datasets
People & History
Show 2 more copyright holdersHide 2 copyright holders
Pick two releases to compare their code metrics.
- RR 4.6.0 released · 2026-04-24
- 2.32.2Latest
- RR 4.5.0 released · 2025-04-11
- RR 4.4.0 released · 2024-04-24
- 2.32.12024-01-19 · diff ↗
- 2.26.12023-09-14 · diff ↗ ·
added 6 exports
as_draws, as_draws_array, as_draws_df, as_draws_list, as_draws_matrix, as_draws_rvars - RR 4.3.0 released · 2023-04-21
- 2.21.42023-04-08 · diff ↗
- RR 4.2.0 released · 2022-04-22
- 2.21.32022-04-09 · diff ↗
- RR 4.1.0 released · 2021-05-18
- 2.21.12020-07-20 · diff ↗ ·
added 5 exports
default_prior_coef, default_prior_intercept, invlogit, logit, posterior_epred - RR 4.0.0 released · 2020-04-24
- 2.19.32020-02-11 · diff ↗
- 2.19.2
- RR 3.6.0 released · 2019-04-26
Show 19 earlier eventsHide 19 earlier events
- 2.18.22018-11-10 · diff ↗
- 2.18.12018-10-21 · diff ↗
- RR 3.5.0 released · 2018-04-23
- 2.17.4
- 2.17.32018-02-18 · diff ↗
- 2.17.22017-12-21 · diff ↗ ·
added 11 exports
Surv, bayes_R2, lkj, plot_stack_jm, posterior_survfit, posterior_traj, ps_check, stan_clogit, stan_jm, stan_mvmer, stan_nlmer - 2.15.32017-04-29 · diff ↗
- RR 3.4.0 released · 2017-04-21
- 2.15.22017-04-19 · diff ↗ ·
added 5 exports
loo_linpred, loo_predict, loo_predictive_interval, pairs_condition, pairs_style_np - 2.14.12017-01-17 · diff ↗ ·
removed 1 export
compareadded 7 exports
compare_models, exponential, laplace, lasso, product_normal, stan_betareg, stan_betareg.fit - 2.13.12016-11-20 · diff ↗ ·
added 4 exports
plot_nonlinear, predictive_error, predictive_interval, prior_summary - 2.12.12016-09-13 · diff ↗
- 2.11.1
- 2.10.1
- 2.9.0-4
- RR 3.3.0 released · 2016-05-03
- 2.9.0-3
- 2.9.0-12016-01-09
- RR 3.2.0 released · 2015-04-16
Package metadata
- First published
- 2016-01-09
- Total releases
- 23 / 10 yrs
- License
- GPL (>= 3) OSI
- Minimum R
- ≥ 3.4.0
- Bundled data
- 38 KB / 10 files
- Download size
- 3.8 MB
Cite
Cite this package
Run in R for the authors' preferred citation:
citation("rstanarm")The package provides a citation file that builds its entry when R runs it. Run citation() to see it.
Cite the R Observatory
For a number measured here: a download total, a coverage figure, an archival date.
From data release v2026-10-18, which the citation names so these numbers can be found later. More on citing and the projects behind them.