Type: Package
Title: Bayesian Quantification of Evidence Sufficiency
Version: 0.1.0
License: MIT + file LICENSE
Language: en-GB
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>.
Encoding: UTF-8
RoxygenNote: 7.3.2
Depends: R (≥ 4.1)
Imports: ggplot2, tibble, dplyr, tidyr, purrr, stats, grDevices
Suggests: knitr, rmarkdown, tidyverse
LazyData: true
VignetteBuilder: knitr
NeedsCompilation: no
Packaged: 2025-12-12 10:29:44 UTC; akira
Author: Dylan Lawless ORCID iD [aut, cre, cph]
Maintainer: Dylan Lawless <admin@switzerlandomics.ch>
Repository: CRAN
Date/Publication: 2025-12-18 14:00:02 UTC

Example binary evidence dataset for Quant ES

Description

Demonstration dataset used in vignettes and examples.

Usage

data(core_test_data)

Format

A data frame with 50 variants and 12 binary evidence columns.


QuantBayES Universal Bayesian Evidence Sufficiency Scoring

Description

Computes posterior theta, credible intervals and percentiles for each variant given a binary evidence matrix.

Usage

quant_es_core(x, a = 1, b = 1, ci_level = 0.95)

Arguments

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.

Value

A list with:

variants

Data frame of per variant scores.

global

Summary list of global posterior distribution.


Read a flat binary table and run quant_es_core

Description

Reads a TSV, CSV or other delimited file where:

Usage

quant_es_from_binary_table(
  path,
  sep = "\t",
  header = TRUE,
  variant_col = NULL
)

Arguments

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.

Value

A standard quantbayes result list.

Examples

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$global


quantbayes plotting utilities

Description

Produces diagnostic plots: global density, overlay density, evidence matrix, p_hat, and theta credible intervals.

Usage

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)
)

Arguments

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.

Value

A list of ggplot objects.

mirror server hosted at Truenetwork, Russian Federation.