## EXAMPLE 1 (from Habibzadeh 2023):
## The results of a new (index) diagnostic test were compared with an existing
## reference. Of 150 individuals that were positive to the reference test, 107
## were positive to the index test. Of 450 individuals that were negative
## to the reference test, 104 were positive to the index test. The known
## sensitivity of the reference test is 0.850. The known specificity of the
## reference test is 0.900.
## What is the diagnostic sensitivity and specificity of the index test?
x <- c(107,104,43,346)
epi.iref(x = x, se.rs = 0.850, sp.rs = 0.900, method = "staquet",
ci.method = "wilson", conf.level = 0.95, warn = TRUE)
## Without correction (i.e., assuming the reference test) has perfect
## diagnostic sensitivity and specificity the sensitivity and specificity of
## the index test is 0.71 (95% CI 0.63 to 0.78) and 0.77 (95% CI 0.73 to
## 0.81), respectively.
## With correction (i.e., accounting for imperfect performance of the reference
## test the sensitivity and specificity of the index test is 0.95 (95% CI 0.91
## to 0.98) and 0.80 (95% CI 0.76 to 0.83), respectively.
Run the code above in your browser using DataLab