gamma_discrepancy: Quantifies deviation from uniformity by the likelihood of...

View source: R/inverse_forward_sampling.R

gamma_discrepancyR Documentation

Quantifies deviation from uniformity by the likelihood of observing the most extreme point on the empirical CDF of the given rank distribution according to [1] (equation 7).

Description

[1] Modrák, Martin, Angie H. Moon, Shinyoung Kim, Paul Bürkner, Niko Huurre, Kateřina Faltejsková, Andrew Gelman, and Aki Vehtari. “Simulation-Based Calibration Checking for Bayesian Computation: The Choice of Test Quantities Shapes Sensitivity.” arXiv, June 15, 2023. https://doi.org/10.48550/arXiv.2211.02383.

Usage

gamma_discrepancy(ranks, post_warmup_draws, log = FALSE)

Arguments

ranks

Rank distribution

post_warmup_draws

Number of posterior draws that were used to calculate the rank distribution.

log

True of the result should be on the log scale.

Value

Measure quantifying deviation from uniformity. This value can be compared to the distribution of gamma expected under uniformity calculated by validation.gamma_null_distribution.


sims1253/bayesim documentation built on Aug. 13, 2024, 5:59 p.m.