sesp.diff.ci: Confidence Intervals for Differences in Sensitivity and...

View source: R/sesp.diff.ci.R

sesp.diff.ciR Documentation

Confidence Intervals for Differences in Sensitivity and Specificity

Description

Calculates confidence intervals for differences in sensitivity and specificity of two binary diagnostic tests in a paired study design.

Usage

sesp.diff.ci(tab, ci.method, alpha, cont.corr)

Arguments

tab

An object of class tab.paired.

ci.method

The available methods are “wald” (Altman, 1991), “agresti-min” (Agresti and Min, 2005), “bonett-price” (Bonett and Price, 2011), and “tango” (Tango, 1998), the default is “wald”.

alpha

Significance level alpha for 100(1-alpha)%-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 ci.method="wald"), the default is FALSE.

Details

For details and recommendations see Newcombe (2012) and Wenzel and Zapf (2013).

Value

A list containing:

sensitivity

A vector containing test1 (the sensitivity of test 1), test2 (the specificity of test 2), diff (the difference between the two sensitivities, computed as test2 - test1), diff.se (the standard error of diff), diff.lcl (the lower confidence limit of diff) and diff.ucl (the upper confidence limit of diff).

specificity

A vector containing test1 (specificity of test 1), test2 (specificity of test 2), diff (the difference between the two specificities, computed as test2 - test1), diff.se (the standard error of diff), diff.lcl (the lower confidence limit of diff) and diff.ucl (the upper confidence limit of diff).

ci.method

The name of the method used to calculate confidence intervals.

alpha

The level alpha used to compute 100(1-alpha)%-confidence intervals.

cont.corr

A logical value indicating whether the continuity correction was applied.

References

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): 729-40.

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): 479-488.

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 paired-sample design. Stat Med, 17(8): 891-908.

Wenzel, D., and Zapf, A. (2013). Difference of two dependent sensitivities and specificities: comparison of various approaches. Biom J, 55(5): 705-718.

Examples

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="agresti-min")
sesp.diff.ci(t1, ci.method="tango")

DTComPair documentation built on Aug. 20, 2023, 5:06 p.m.