Journal of Open Research Software (Dec 2021)
bayesint: A Python Package for Calculating Bayesian Credible Intervals of Ratios of Beta Distributions
Abstract
We present 'bayesint', a Python package for calculating Bayesian credible intervals for ratios of two independent beta distributions such as are used when considering binomial data. Such data could be found in counts of events in medical diagnostic tests, case-control studies, and field epidemiological investigations, among other applications. The package contains general functions providing the expression of the density and distribution of the ratio and two functions for calculating the equal-tailed and highest posterior density credible intervals. The package is intended for use with 2×2 contingency tables. We introduce 'bayesint' by comparing two groups in a contingency table through calculating the relative risk of cholera, showcasing its use in a novel context.
Keywords