Package {ebaTools}


Title: Evidence-Based Assessment Tools for Diagnostic Test Evaluation
Version: 0.1.0
Description: Provides functions for evidence-based assessment of diagnostic tests. Includes calculation of common diagnostic accuracy statistics, Bayesian updating of probabilities, interpretation of likelihood ratios, and visualization using a Fagan nomogram.
License: MIT + file LICENSE
Encoding: UTF-8
RoxygenNote: 8.0.0
URL: https://github.com/rmcgill777/ebaTools
BugReports: https://github.com/rmcgill777/ebaTools/issues
NeedsCompilation: no
Packaged: 2026-07-19 17:06:19 UTC; rmcgill777
Author: Ryan McGill [aut, cre]
Maintainer: Ryan McGill <rmcgill@wm.edu>
Repository: CRAN
Date/Publication: 2026-07-28 16:40:16 UTC

Bayesian Updating

Description

Calculate post-test probabilities from a pre-test probability and positive/negative likelihood ratios.

Usage

bayes_update(pretest_probability, lr_positive, lr_negative)

Arguments

pretest_probability

Numeric value between 0 and 1 representing the pre-test probability.

lr_positive

Positive likelihood ratio.

lr_negative

Negative likelihood ratio.

Value

An object of class "bayes_update" containing:

pretest_probability

Original pre-test probability.

post_positive

Post-test probability following a positive test.

post_negative

Post-test probability following a negative test.


Evidence-Based Assessment Interpretation

Description

Interpret a post-test probability using evidence-based assessment decision thresholds.

Usage

eba_interpretation(
  post_probability,
  wait_threshold = 0.1,
  treat_threshold = 0.7
)

Arguments

post_probability

Numeric value between 0 and 1.

wait_threshold

Threshold below which the condition is considered unlikely. Default = 0.10.

treat_threshold

Threshold above which the condition is considered likely. Default = 0.70.

Value

An object of class "eba_interpretation".


Evidence-Based Assessment Statistics

Description

Calculate evidence-based assessment statistics from a 2 × 2 contingency table.

Usage

eba_stats(tp, fp, fn, tn)

Arguments

tp

Number of true positives.

fp

Number of false positives.

fn

Number of false negatives.

tn

Number of true negatives.

Value

An object of class "eba_stats".

Examples

eba_stats(
  tp = 50,
  fp = 10,
  fn = 5,
  tn = 100
)


Fagan Nomogram

Description

Plot pre-test and post-test probabilities using likelihood ratios.

Usage

fagan_nomogram(pretest_probability, lr_positive, lr_negative)

Arguments

pretest_probability

Numeric value between 0 and 1.

lr_positive

Positive likelihood ratio.

lr_negative

Negative likelihood ratio.

Value

Invisibly returns the calculated probabilities.