Bayesian Analysis to Compare Models using Resampling Statistics
Overview
Bayesian analysis used here to answer the question: "when looking at resampling results, are the differences between models 'real'?" To answer this, a model can be created were the performance statistic is the resampling statistics (e.g. accuracy or RMSE). These values are explained by the model types. In doing this, we can get parameter estimates for each model's affect on performance and make statistical (and practical) comparisons between models. The methods included here are similar to Benavoli et al (2017) https://jmlr.org/papers/v18/16-305.html.
- New
stan_glmer_inits()computes data-based starting values for the Bayesian models used byperf_mod(). The results can be passed torstanarm::stan_glmer()(directly or viaperf_mod(..., init = )) and can shorten warmup for models that are slow to converge, such as those with heterogeneous variances. perf_mod()gains aninitializeargument (defaultFALSE) that computes and applies these starting values automatically, reusing the samplerseed(when one is passed) so that the entire fit is reproducible.- Fixed a bug where
perf_mod()duplicated the resampling statistics for workflow sets: when more than one metric had been collected, each statistic was included in the Bayesian model once per metric. - New
compare_to_leader()contrasts every model in aperf_mod()object against the best model in the set and returns a data frame of probability statements about how much each candidate gives up relative to that leader.autoplot()on the result draws the posterior metric intervals alongside those probabilities. - New
initialize_keys()builds a template of model labels to edit and pass to thekeyargument ofcompare_to_leader(). perf_mod()gains aselect_bestargument for workflow sets. Workflows are always reduced to their own best tuning parameter candidate;select_best = TRUEadditionally collapses workflows that fit the same type of model with the same engine down to the best of each group, so that each model type/engine combination competes once. The default,FALSE, keeps the existing behavior of one competitor perwflow_id.
From NEWS.md in the release
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-09
Show 2 earlier changesHide 2 earlier changes
- ERROR12 OK, 1 ERROR2026-06-08
- OK14 OK2026-03-10
Documentation
- Help pages
- 17 (5 internal)includes a package overview page
- Examples that run
- 100%10 run in a plain check (3 of them under a condition)
- Exported functions with examples
- 40%
- Documented parameters
- 64%
- Return-value docs
- 60%
- Help pages citing references
- 6%
Downloads
Repository
- PRs merged (all time)
- 98%
- Median days to close, 50 most recently updated closed issues
- 6
- 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
Commits over time
Commit identities over time
14 development-tooling and community-health practices detected across 6 families in the upstream repository
Checks run against github.com/tidymodels/tidyposterior on 2026-10-11.
The R CMD check workflow runs on Linux, macOS and Windows, and on R-devel
GitHub Pages site last deployed 2026-09-17 · The repository has a site deploy workflow
pkgdown site last built 2026-09-02
Show all practicesHide 2 practices
Dependencies
Code & Tests
Datasets
People & History
Pick two releases to compare their code metrics.
- 1.1.0Latest2026-09-02 · current release · diff ↗ ·
added 3 exports
compare_to_leader, initialize_keys, stan_glmer_inits - RR 4.6.0 released · 2026-04-24
- 1.0.22025-07-31 · diff ↗
- RR 4.5.0 released · 2025-04-11
- RR 4.4.0 released · 2024-04-24
- 1.0.12023-10-11 · diff ↗
- RR 4.3.0 released · 2023-04-21
- 1.0.02022-06-23 · diff ↗
- RR 4.2.0 released · 2022-04-22
- RR 4.1.0 released · 2021-05-18
- 0.1.0
- 0.0.32020-06-11 · diff ↗ ·
added 24 exports
vec_cast.data.frame.posterior, vec_cast.data.frame.posterior_diff, vec_cast.posterior.data.frame, vec_cast.posterior.posterior, vec_cast.posterior.tbl_df, vec_cast.posterior_diff.data.frame, vec_cast.posterior_diff.posterior_diff, vec_cast.posterior_diff.tbl_df, vec_cast.tbl_df.posterior, vec_cast.tbl_df.posterior_diff, vec_proxy.posterior, vec_proxy.posterior_diff, vec_ptype2.data.frame.posterior, vec_ptype2.data.frame.posterior_diff, vec_ptype2.posterior.data.frame, vec_ptype2.posterior.posterior, vec_ptype2.posterior.tbl_df, vec_ptype2.posterior_diff.data.frame, vec_ptype2.posterior_diff.posterior_diff, vec_ptype2.posterior_diff.tbl_df, vec_ptype2.tbl_df.posterior, vec_ptype2.tbl_df.posterior_diff, vec_restore.posterior, vec_restore.posterior_diff - RR 4.0.0 released · 2020-04-24
- RR 3.6.0 released · 2019-04-26
- 0.0.2
- RR 3.5.0 released · 2018-04-23
Show 2 earlier eventsHide 2 earlier events
- 0.0.12017-11-14
- RR 3.4.0 released · 2017-04-21
Package metadata
- First published
- 2017-11-14
- Total releases
- 8 / 9 yrs
- License
- MIT + file LICENSE OSI · relicensed from GPL-2 in 0.1.0
- Minimum R
- ≥ 4.1
- Bundled data
- 185 KB / 5 files
- Download size
- 307 KB
Cite
Cite this package
Run in R for the authors' preferred citation:
citation("tidyposterior")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-17, which the citation names so these numbers can be found later. More on citing and the projects behind them.