From 8b5335610086e41c50accab705bc1e4c5e7d4a69 Mon Sep 17 00:00:00 2001 From: Adam Howes Date: Wed, 16 Oct 2024 17:31:41 +0100 Subject: [PATCH] Issue #391: Add `priorsense` to FAQ (#392) --- DESCRIPTION | 3 ++- vignettes/faq.Rmd | 10 ++++++++++ vignettes/references.bib | 21 ++++++++++++++++----- 3 files changed, 28 insertions(+), 6 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 5cf4bf151..e342ed8b2 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -50,7 +50,8 @@ Suggests: tidybayes, modelr, patchwork, - cmdstanr + cmdstanr, + priorsense Additional_repositories: https://stan-dev.r-universe.dev Config/Needs/website: diff --git a/vignettes/faq.Rmd b/vignettes/faq.Rmd index 869c9b8d9..e0df64174 100644 --- a/vignettes/faq.Rmd +++ b/vignettes/faq.Rmd @@ -158,6 +158,16 @@ quantile(pred$mean, c(0.01, 0.1, 0.25, 0.5, 0.75, 0.9, 0.99)) quantile(pred$sd, c(0.01, 0.1, 0.25, 0.5, 0.75, 0.9, 0.99)) ``` +# How can I assess how sensitive the fitted posterior distribution is to the prior distribution used? + +We recommend use of the [`priorsense`](https://github.com/n-kall/priorsense) R package [@kallioinen2024detecting] to check how sensitive the posterior distribution is to perturbations of the prior distribution and likelihood using power-scaling analysis: + +```{r} +library(priorsense) +powerscale_plot_dens(fit, variable = c("Intercept", "Intercept_sigma")) + + theme_minimal() +``` + # What do the parameters in my model output correspond to? The `epidist` package uses `brms` to fit models. diff --git a/vignettes/references.bib b/vignettes/references.bib index 8425d35d3..d69f99724 100644 --- a/vignettes/references.bib +++ b/vignettes/references.bib @@ -103,9 +103,20 @@ @article{fang2016transmission } @misc{who_ebola_2014_2016, - author = {{World Health Organization}}, - title = {Ebola outbreak 2014-2016 - West Africa}, - year = 2016, - url = {https://www.who.int/emergencies/situations/ebola-outbreak-2014-2016-West-Africa}, - note = {Accessed: 2024-05-28} + author={{World Health Organization}}, + title={Ebola outbreak 2014-2016 - West Africa}, + year=2016, + url={https://www.who.int/emergencies/situations/ebola-outbreak-2014-2016-West-Africa}, + note={Accessed: 2024-05-28} +} + +@article{kallioinen2024detecting, + title={Detecting and diagnosing prior and likelihood sensitivity with power-scaling}, + author={Kallioinen, Noa and Paananen, Topi and B{\"u}rkner, Paul-Christian and Vehtari, Aki}, + journal={Statistics and Computing}, + volume={34}, + number={1}, + pages={57}, + year={2024}, + publisher={Springer} }