summary.lr_dist: Summarise a Likelihood-Ratio Distribution

View source: R/lr_dist_s3.R

summary.lr_distR Documentation

Summarise a Likelihood-Ratio Distribution

Description

Computes the decision-theoretic summary of an lr_dist object: the mean, variance and standard deviation of \log_{10}\mathrm{LR} under each hypothesis, the median and quartiles, the area under the ROC curve, and the total probability mass (a sanity check on the input joint).

Usage

## S3 method for class 'lr_dist'
summary(object, ...)

Arguments

object

An lr_dist object (see as_lr_dist()).

...

Unused.

Details

mean_h1 is E[\log_{10}\mathrm{LR}\mid H_1] and equals the per-marker KL-derived expectation. A +Inf atom drives the H1 moments to +Inf (and a -Inf atom the H2 moments to -Inf), matching the engine's ⁠0\log 0 = 0⁠ convention. auc is the exact concordance statistic P(\mathrm{LR}_{H_1} > \mathrm{LR}_{H_2}) + \tfrac12 P(\mathrm{LR}_{H_1} = \mathrm{LR}_{H_2}).

Value

A list of class summary.lr_dist with components mean_h1, mean_h2, var_h1, var_h2, sd_h1, sd_h2, mass_h1, mass_h2, auc, quantiles_h1, quantiles_h2, has_pos_inf and has_neg_inf. Printed in a compact table.

See Also

plot.lr_dist(), as_lr_dist()

Examples

d <- as_lr_dist(data.frame(
  log10_lr = c(-1, 0, 2),
  p_h1 = c(0.1, 0.3, 0.6),
  p_h2 = c(0.6, 0.3, 0.1)
))
s <- summary(d)
s$mean_h1
s$auc

mispitools documentation built on Aug. 26, 2026, 1:08 a.m.