plot.lr_dist: Plot a Likelihood-Ratio Distribution

View source: R/lr_dist_s3.R

plot.lr_distR Documentation

Plot a Likelihood-Ratio Distribution

Description

Draws the discrete \log_{10}\mathrm{LR} distribution under both hypotheses as an overlaid lollipop plot: H_1 (related, blue) and H_2 (unrelated, red). Less overlap means stronger discrimination.

Usage

## S3 method for class 'lr_dist'
plot(x, ...)

Arguments

x

An lr_dist object (see as_lr_dist()).

...

Unused.

Details

+Inf / -Inf atoms cannot be placed on a finite axis and are dropped from the plot with a message; their mass is still reported by summary.lr_dist(). The x-axis is \log_{10}\mathrm{LR} (0 = neutral, ⁠> 0⁠ favours H_1).

Value

A ggplot2 object.

See Also

summary.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)
))
plot(d)

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