Description Usage Arguments Details Value References Examples
Calculates confidence intervals for differences in sensitivity and specificity of two binary diagnostic tests in a paired study design.
1  sesp.diff.ci(tab, ci.method, alpha, cont.corr)

tab 
An object of class 
ci.method 
The available methods are “ 
alpha 
Significance level alpha for 100(1alpha)%confidence intervals for the difference in sensitivity and specificity, the default is 0.05. 
cont.corr 
A logical value indicating whether the continuity correction should be used (only available for 
For details and recommendations see Newcombe (2012) and Wenzel and Zapf (2013).
A list containing:
sensitivity 
A vector containing

specificity 
A vector containing

ci.method 
The name of the method used to calculate confidence intervals. 
alpha 
The level alpha used to compute 100(1alpha)%confidence intervals. 
cont.corr 
A logical value indicating whether the continuity correction was applied. 
Altman, D.G. (1991). Practical statistics for medical research. Chapman & Hall, London.
Agresti, A. and Min, Y. (2005). Simple improved confidence intervals for comparing matched proportions. Stat Med, 24(5): 72940.
Bonett, D.G., and Price, R.M. (2011). Adjusted Wald confidence intervals for a difference of binomial proportions based on paired data. J Educ Behav Stat, 37(4): 479488.
Newcombe R.G. (2012). Confidence intervals for proportions and related measures of effect size. Chapman and Hall/CRC Biostatistics Series.
Tango, T. (1998). Equivalence test and confidence interval for the difference in proportions for the pairedsample design. Stat Med, 17(8): 891908.
Wenzel, D., and Zapf, A. (2013). Difference of two dependent sensitivities and specificities: comparison of various approaches. Biom J, 55(5): 705718.
1 2 3 4 5 6 7 8  library(DTComPair)
t1 < read.tab.paired(18, 14, 0, 18,
18, 12, 2, 18)
t1
sesp.diff.ci(t1, ci.method="wald", cont.corr=FALSE)
sesp.diff.ci(t1, ci.method="wald", cont.corr=TRUE)
sesp.diff.ci(t1, ci.method="agrestimin")
sesp.diff.ci(t1, ci.method="tango")

Loading required package: gee
Loading required package: PropCIs
Two binary diagnostic tests (paired design)
Test1: 'Noname 1'
Test2: 'Noname 2'
Diseased:
Test1 pos. Test1 neg. Total
Test2 pos. 18 14 32
Test2 neg. 0 18 18
Total 18 32 50
Nondiseased:
Test1 pos. Test1 neg. Total
Test2 pos. 18 12 30
Test2 neg. 2 18 20
Total 20 30 50
$sensitivity
test1 test2 diff diff.se diff.lcl diff.ucl
0.36000000 0.64000000 0.28000000 0.06349803 0.15554615 0.40445385
$specificity
test1 test2 diff diff.se diff.lcl diff.ucl
0.60000000 0.40000000 0.20000000 0.06928203 0.33579029 0.06420971
$ci.method
[1] "wald"
$alpha
[1] 0.05
$cont.corr
[1] FALSE
$sensitivity
test1 test2 diff diff.se diff.lcl diff.ucl
0.36000000 0.64000000 0.28000000 0.08349803 0.11634687 0.44365313
$specificity
test1 test2 diff diff.se diff.lcl diff.ucl
0.60000000 0.40000000 0.20000000 0.08928203 0.37498957 0.02501043
$ci.method
[1] "wald"
$alpha
[1] 0.05
$cont.corr
[1] TRUE
$sensitivity
test1 test2 diff diff.se diff.lcl diff.ucl
0.36000000 0.64000000 0.28000000 0.06444681 0.15368658 0.40631342
$specificity
test1 test2 diff diff.se diff.lcl diff.ucl
0.60000000 0.40000000 0.20000000 0.06954236 0.33630053 0.06369947
$ci.method
[1] "agrestimin"
$alpha
[1] 0.05
$cont.corr
[1] FALSE
$sensitivity
test1 test2 diff diff.se diff.lcl diff.ucl
0.3600000 0.6400000 0.2800000 NA 0.1747417 0.4166512
$specificity
test1 test2 diff diff.se diff.lcl diff.ucl
0.60000000 0.40000000 0.20000000 NA 0.34470882 0.06111243
$ci.method
[1] "tango"
$alpha
[1] 0.05
$cont.corr
[1] FALSE
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.