| Title: | Recover Diagnostic Test Accuracy Counts from Reported Accuracy Measures |
|---|---|
| Description: | Implements a system of linear equations to recover unreported diagnostic test accuracy cell counts from commonly reported measures such as sensitivity, specificity, predictive values, prevalence, and sample size. The package is intended for applied researchers who require complete 2x2 table counts for downstream analyses. |
| Authors: | Conrad Kabali [aut, cre] |
| Maintainer: | Conrad Kabali <[email protected]> |
| License: | MIT + file LICENSE |
| Version: | 0.1.0 |
| Built: | 2026-05-14 08:28:17 UTC |
| Source: | https://github.com/cran/diagcounts |
Recovers unreported true positive (TP), false negative (FN), false positive (FP), and true negative (TN) counts using a system of linear equations.
derive_counts( n, sensitivity = NULL, specificity = NULL, ppv = NULL, npv = NULL, prevalence = NULL, tol = 1e-06 )derive_counts( n, sensitivity = NULL, specificity = NULL, ppv = NULL, npv = NULL, prevalence = NULL, tol = 1e-06 )
n |
Total sample size. |
sensitivity |
Test sensitivity. |
specificity |
Test specificity. |
ppv |
Positive predictive value. |
npv |
Negative predictive value. |
prevalence |
Pretest probability. |
tol |
Numerical tolerance for validation. |
An object of class diagcounts with elements TP, FN, FP, TN.
Xie X, Wang M, Antony J, Vandersluis S, Kabali CB (2025). System of Linear Equations to Derive Unreported Test Accuracy Counts. Statistics in Medicine. https://doi.org/10.1002/sim.70336
# Recover unreported diagnostic counts from published accuracy measures derive_counts( n = 105, sensitivity = 0.6, specificity = 0.893, prevalence = 0.733 ) # Recover counts using predictive values derive_counts( n = 160, sensitivity = 0.75, ppv = 0.75, npv = 0.75 )# Recover unreported diagnostic counts from published accuracy measures derive_counts( n = 105, sensitivity = 0.6, specificity = 0.893, prevalence = 0.733 ) # Recover counts using predictive values derive_counts( n = 160, sensitivity = 0.75, ppv = 0.75, npv = 0.75 )