Add ref_interval option to mcmc_rank_* functions.#248
Add ref_interval option to mcmc_rank_* functions.#248hhau wants to merge 1 commit intostan-dev:masterfrom
Conversation
…mcmc_rank_* functions
|
Additionally, I added some tests for the |
|
I deleted my previous comment that I wrote as I was not thinking straight. As the mcmc_rank histograms are based on multiple samples that are dependent via computing ranks for the combined values, the confidence intervals for the bins are not binomially distributed. I'll get back to you soon with the correct intervals, and suggestion to add also the reference line for exact uniformity. |
|
Ok thanks Aki! |
|
I recently watched https://youtu.be/HKPm6txxxQM?t=1889, and it made me reconsider this.
Probably best to close this then? Up to y'all. |
|
Let's keep this open for a moment as there might be a solution for this. |
Not sure if this is something that you've thought about before but decided against, but I quite often want to add an uncertainty interval to the
mcmc_rank_*functions (not everyone knows how to interpret them yet). Because these are binned rank histograms, we can use the argument employed in the Simulated Bayesian Calibration paper to get appropriate uncertainty intervals. Said intervals are based on the expected distribution of the rank histobins (which follow a binomial distribution).mcmc_rank_*functions default to not drawing this interval, but when it is requested (usingref_interval = TRUE), the defaults are a 95% uncertainty interval drawn withalpha = 0.2.Here is the default behaviour:
And here is a slightly more complicated example, with some very bad draws added:
Created on 2020-11-06 by the reprex package (v0.3.0)