BBUM_expperf: Expected sensitivity and specificity by the BBUM model

View source: R/BBUM_expperf.R

BBUM_expperfR Documentation

Expected sensitivity and specificity by the BBUM model

Description

BBUM_expperf computes the expected performance in terms of sensitivity and specificity values at quantiles q (raw p-values) according to the given parameters of the BBUM distribution.

Usage

BBUM_expperf(q, lambda, a, theta, r, dtratio = Inf)

Arguments

q

Vector of quantiles.

lambda

Vector of BBUM parameter lambda. lambda is the fraction of null (uniform distribution density) over all density except the primary beta distribution, i.e. null plus secondary beta.

a

Vector of BBUM parameter a, which corresponds to the a shape parameter of the secondary beta distribution component. It describes the steepness of the second beta distribution.

theta

Vector of BBUM parameter theta. theta is the fraction of primary beta distribution density over all density.

r

Vector of BBUM parameter r, which is the ratio of the a shape parameter of the primary beta distribution over that of the secondary beta distribution. In other words, a*r is the shape parameter for the primary beta distribution component.

dtratio

If using the "two-tailed" case of BBUM correction, provide the ratio of number of data points in the signal class over that in the background class. Leave as Inf for the "one-tailed" case (the default). See Details.

Details

This is primarily used for plotting in BBUM_plot(option = "confusion").

Sensitivity is the fraction of positives that are correctly called as positives.

Specificity is the fraction of negatives that are correctly called as negatives.

If the background assumption is weak, such that a small number of bona fide hits are anticipated and relevant to the hypothesis at hand among the data points designated "background class", the FDR could be made to include the background class. This is akin to a two-tailed test (despite a one-tailed assumption to begin with). This would allow the generation of genuine FDR-corrected p values for the background class points as well. Toggle this using the dtratio value.

Value

A named list of two vectors of the same length as q, under names sensitivity and specificity.

Examples

# Default
BBUM_expperf(q = c(0.001, 0.007, 0.19, 0.5, 0.99),
  lambda = 0.65, a = 0.1, theta = 0.02, r = 0.07)
# "Two-tailed"
BBUM_expperf(q = c(0.001, 0.007, 0.19, 0.5, 0.99),
  lambda = 0.65, a = 0.1, theta = 0.02, r = 0.07, dtratio = 1.13)


wyppeter/bbum documentation built on Oct. 3, 2023, 3:29 p.m.