[R-sig-Epi] Estimating CI for sensitivity and specificity
Mark Stevenson
M.Stevenson at massey.ac.nz
Tue Mar 4 00:39:04 CET 2008
The 'epicentre' package (see the link on http://epicentre.massey.ac.nz/) has
a function (epi.tests) that returns point estimates and confidence intervals
on true and apparent prevalence, sensitivity, specificity, positive and
negative predictive values, and positive and negative likelihood ratios from
count data provided in a 2 by 2 table.
The following is the example from the function documentation:
## A new diagnostic test was trialled on 2000 patients. Of 1000 patients
## that were disease positive, 750 tested positive. Of 1000 patients that
## were disease negative, 550 tested negative. What is the likeliood
## ratio of a positive test?
epi.tests(750, 450, 250, 550, alpha = 0.05, verbose = FALSE)
Disease + Disease - Total
Test + 750 450 1200
Test - 250 550 800
Total 1000 1000 2000
Point estimates and 95 % CIs:
---------------------------------------------------------
Apparent prevalence: 0.6 (0.58, 0.62)
True prevalence: 0.5 (0.48, 0.52)
Sensitivity: 0.75 (0.72, 0.78)
Specificity: 0.55 (0.52, 0.58)
Positive predictive value: 0.62 (0.6, 0.65)
Negative predictive value: 0.69 (0.65, 0.72)
Likelihood ratio positive: 1.67 (1.54, 1.8)
Likelihood ratio negative: 0.45 (0.4, 0.51)
---------------------------------------------------------
## The likelihood ratio of a positive test was 1.67 (95% CI 1.54 to 1.8).
Hope this is useful.
Regards,
Mark Stevenson
*************************************************
Mark Stevenson
Associate Professor, Veterinary Epidemiology
IVABS, Massey University
Private Bag 11-222
Palmerston North New Zealand
Ph: + 64 (06) 350 5915
Fx: + 64 (06) 350 5716
M.Stevenson at massey.ac.nz
More information about the R-sig-Epi
mailing list