Skip to content
Celeus

Diagnostic accuracy (2x2)

Shown in the app as diagnostic_accuracy. Part of the method reference, under Diagnostic accuracy and agreement.

When to use

Agreement of a BINARY test against a BINARY gold standard: sensitivity, specificity, PPV, and NPV (each with a confidence interval), the 2x2 counts, and disease prevalence.

What you provide

  • Test result, then reference standard: two categorical columns.

Options

Missing data

  • Complete case (listwise deletion)

Multiple comparisons

  • Not adjustable for this method. Where it makes post-hoc comparisons, the procedure applies its own correction.

Confidence level

Every interval in the result is reported at the level you choose:

  • 90%
  • 95%
  • 99%

Other methods under Diagnostic accuracy and agreement:

Worked examples

Celeus's result on a published or illustrative dataset, next to an independent computation and, where one exists, a published value. The data themselves are not reproduced here.

documented illustrative 2x2 screening fixture

  • Source: Illustrative or synthetic example data
  • Licence: illustrative fixture (not real patient data); the counts are an educational example
  • Reference: Illustrative screening-test 2x2 (TP=95, FP=90, FN=5, TN=810); textbook-style table, not real patient data
QuantityCeleusIndependent computationPublished valueAgrees
Sensitivity0.950.950.95Yes
Specificity0.90.90.9Yes
Positive predictive value0.5135140.513514-Yes
Negative predictive value0.9938650.993865-Yes
Prevalence0.10.10.1Yes

illustrative 2x2 (abnormal/normal labels, positive chosen)

  • Source: Illustrative or synthetic example data
  • Licence: n/a (illustrative counts written for this check)
  • Reference: Illustrative 2x2 table (TP 231, FP 32, FN 27, TN 54) written for this check, not sourced data
QuantityCeleusIndependent computationPublished valueAgrees
Sensitivity0.8953490.895349-Yes
Specificity0.6279070.627907-Yes
Positive predictive value0.8783270.878327-Yes
Negative predictive value0.6666670.666667-Yes
Prevalence0.750.75-Yes
Positive likelihood ratio2.406252.40625-Yes
Diagnostic odds ratio14.437514.4375-Yes

illustrative 2x2 (test Positive/Negative, reference Disease/Healthy)

  • Source: Illustrative or synthetic example data
  • Licence: n/a (illustrative counts written for this check)
  • Reference: Illustrative 2x2 table (TP 231, FP 32, FN 27, TN 54) written for this check, not sourced data
QuantityCeleusIndependent computationPublished valueAgrees
Sensitivity0.8953490.895349-Yes
Specificity0.6279070.627907-Yes
Positive predictive value0.8783270.878327-Yes
Negative predictive value0.6666670.666667-Yes
Prevalence0.750.75-Yes
Positive likelihood ratio2.406252.40625-Yes

illustrative 2x2 (coded 1 = abnormal, 2 = normal; category order puts 1 last)

  • Source: Illustrative or synthetic example data
  • Licence: n/a (illustrative counts written for this check)
  • Reference: Illustrative 2x2 table (TP 231, FP 32, FN 27, TN 54) written for this check, not sourced data
QuantityCeleusIndependent computationPublished valueAgrees
Sensitivity0.8953490.895349-Yes
Specificity0.6279070.627907-Yes
Positive predictive value0.8783270.878327-Yes
Negative predictive value0.6666670.666667-Yes
Prevalence0.750.75-Yes
Positive likelihood ratio2.406252.40625-Yes

illustrative 2x2 with 12 index-test results missing (rows 1-6 and 300-305), 90% intervals

  • Source: Illustrative or synthetic example data
  • Licence: n/a (illustrative counts written for this check)
  • Reference: Illustrative 2x2 table (TP 231, FP 32, FN 27, TN 54) written for this check, not sourced data
QuantityCeleusIndependent computationPublished valueAgrees
Sensitivity0.8928570.892857-Yes
Specificity0.60.6-Yes
Positive predictive value0.8754860.875486-Yes
Negative predictive value0.640.64-Yes
Prevalence0.7590360.759036-Yes
Positive likelihood ratio2.232142.23214-Yes
Number of observations332332-Yes
Confidence interval for the sensitivity0.855283, 0.9232900.855283, 0.923290-Yes

synthetic example (a perfect 10/0/0/10 2x2)

  • Source: Illustrative or synthetic example data
  • Licence: n/a (synthetic data written for this check, not sourced)
  • Reference: Hand-authored synthetic fixture, not sourced or published data; the zero cells leave the likelihood ratios not estimable.
QuantityCeleusIndependent computationPublished valueAgrees
Sensitivity11-Yes
Specificity11-Yes
Confidence interval for the sensitivity0.691503, 1.0000000.691503, 1.000000-Yes

documented illustrative 2x2 screening fixture (90% intervals)

  • Source: Illustrative or synthetic example data
  • Licence: illustrative fixture (not real patient data); the counts are an educational example
  • Reference: Illustrative screening-test 2x2 (TP=95, FP=90, FN=5, TN=810); textbook-style table, not real patient data
QuantityCeleusIndependent computationPublished valueAgrees
Confidence interval for the sensitivity0.897747, 0.9800940.897747, 0.980094-Yes
Positive likelihood ratio9.59.5-Yes

Validation report

References

  1. Youden, W. J. (1950). Index for rating diagnostic tests. Cancer 3: 32-35. doi:10.1002/1097-0142(1950)3:1<32::AID-CNCR2820030106>3.0.CO;2-3 doi:10.1002/1097-0142(1950)3:1<32::AID-CNCR2820030106>3.0.CO;2-3
  2. Clopper, C. J., Pearson, E. S. (1934). The use of confidence or fiducial limits illustrated in the case of the binomial. Biometrika 26: 404-413. doi:10.1093/biomet/26.4.404 doi:10.1093/biomet/26.4.404
  3. Simel, D. L., Samsa, G. P., Matchar, D. B. (1991). Likelihood ratios with confidence: sample size estimation for diagnostic test studies. Journal of Clinical Epidemiology 44: 763-770. doi:10.1016/0895-4356(91)90128-V doi:10.1016/0895-4356(91)90128-V