| Title: | Bayesian Quantification of Evidence Sufficiency |
|---|---|
| Description: | Implements the Quantification Evidence Standard algorithm for computing Bayesian evidence sufficiency from binary evidence matrices. It provides posterior estimates, credible intervals, percentiles, and optional visual summaries. The method is universal, reproducible, and independent of any specific clinical or rule based framework. For details see The Quantitative Omics Epidemiology Group et al. (2025) <doi:10.64898/2025.12.02.25341503>. |
| Authors: | Dylan Lawless [aut, cre, cph] (ORCID: <https://orcid.org/0000-0001-8496-3725>) |
| Maintainer: | Dylan Lawless <[email protected]> |
| License: | MIT + file LICENSE |
| Version: | 0.1.0 |
| Built: | 2026-05-17 07:56:40 UTC |
| Source: | https://github.com/cran/quantbayes |
Demonstration dataset used in vignettes and examples.
data(core_test_data)data(core_test_data)
A data frame with 50 variants and 12 binary evidence columns.
Computes posterior theta, credible intervals and percentiles for each variant given a binary evidence matrix.
quant_es_core(x, a = 1, b = 1, ci_level = 0.95)quant_es_core(x, a = 1, b = 1, ci_level = 0.95)
x |
matrix of 0 and 1, rows are variants and columns are evidence rules. |
a |
prior alpha parameter. |
b |
prior beta parameter. |
ci_level |
credible interval width. |
A list with:
Data frame of per variant scores.
Summary list of global posterior distribution.
Reads a TSV, CSV or other delimited file where:
the first column is a variant identifier (unless removed)
remaining columns contain binary 0, 1, or NA evidence indicators.
quant_es_from_binary_table( path, sep = "\t", header = TRUE, variant_col = NULL )quant_es_from_binary_table( path, sep = "\t", header = TRUE, variant_col = NULL )
path |
Path to a text file. |
sep |
Field separator (default tab). |
header |
Whether the file has a header. |
variant_col |
Column name containing the variant IDs. If NULL and no such column exists, sequential IDs will be created. |
A standard quantbayes result list.
tmp <- tempfile(fileext = ".tsv") write.table(core_test_data, tmp, sep = "\t", quote = FALSE, row.names = FALSE) res <- quant_es_from_binary_table(tmp) res$globaltmp <- tempfile(fileext = ".tsv") write.table(core_test_data, tmp, sep = "\t", quote = FALSE, row.names = FALSE) res <- quant_es_from_binary_table(tmp) res$global
Produces diagnostic plots: global density, overlay density, evidence matrix, p_hat, and theta credible intervals.
quant_es_plots( res, x_matrix, top_n = 20, top_overlay = 10, highlight_points = NULL, palette10 = (grDevices::colorRampPalette(c("#2f4356", "#656d87", "#f1e1d4", "#ffbf00", "#ee4035")))(10), palette20 = (grDevices::colorRampPalette(c("#656d87", "#2f4356")))(20) )quant_es_plots( res, x_matrix, top_n = 20, top_overlay = 10, highlight_points = NULL, palette10 = (grDevices::colorRampPalette(c("#2f4356", "#656d87", "#f1e1d4", "#ffbf00", "#ee4035")))(10), palette20 = (grDevices::colorRampPalette(c("#656d87", "#2f4356")))(20) )
res |
Result from quant_es_core. |
x_matrix |
Evidence matrix used for the run. |
top_n |
Number of variants for matrix and summary plots. |
top_overlay |
Number of top variants used in overlay density. |
highlight_points |
Optional list of highlighted variants. |
palette10 |
Colour palette for overlay density lines. |
palette20 |
Colour palette for p_hat plot. |
A list of ggplot objects.