Calculates two-sided Wald confidence intervals and performs a Wald test for the relative sensitivity and specificity of two binary diagnostic tests in a paired study design.
sesp.rel(tab, alpha)
A list containing:
a named vector containing test1
(the sensitivity for test 1), test2
(the sensitivity for test 2),
rel.sens
(the relative difference between the two sensitivities, computed as test2/test1
),
se.log.rel.sens
(the standard error for log(rel.sens
)), lcl.rel.sens
(the lower confidence limit for rel.sens
),
ucl.rel.sens
(the upper confidence limit for rel.sens
), and pval.rel.sens
(the p-value from the test for
the null hypothesis: relative sensitivity=1).
a named vector containing test1
(the specificity for test 1), test2
(the specificity for test 2),
rel.spec
(the relative difference between the two specificities, computed as test2/test1
),
se.log.rel.spec
(the standard error for log(rel.spec
)), lcl.rel.spec
(the lower confidence limit for rel.spec
),
ucl.rel.spec
(the upper confidence limit for rel.spec
), and pval.rel.spec
(the p-value from the test for
the null hypothesis: relative specificity=1).
significance level alpha for 100(1-alpha)%-confidence intervals for rel.sens
and rel.spec
.
an object of class tab.paired
.
significance level alpha used to compute two-sided 100(1-alpha)%-confidence intervals, the default is 0.05.
If relative sensitivity>1, the percentage increase in sensitivity for test2
relative to test1
is computed as 100(relative sensitivity-1)%. If
relative sensitivity<1 the percentage decrease in sensitivity for test2
relative to test1
is computed as 100(1-relative sensitivity)%.
Percentage increase/decrease in specificity is computed in an analogous fashion.
Given the independence of relative sensitivity and relative specificity, a possible joint 100(1-alpha)% confidence region for {relative sensitivity, relative specificity}
is formed by the rectangle {lcl.rel.sens
, ucl.rel.sens
} x {lcl.rel.spec
, ucl.rel.spec
}, where {lcl.rel.sens
, ucl.rel.sens
} and
{lcl.rel.spec
, ucl.rel.spec
} are 100(1-alpha*)% confidence intervals for relative sensitivity and relative specificity, respectively, and alpha*=1-sqrt(1-alpha).
The McNemar's test implemented in sesp.mcnemar
is asymptotically equivalent to the Wald test implemented here.
Alonzo, T. A., Pepe, M. S., & Moskowitz, C. S. (2002). Sample size calculations for comparative studies of medical tests for detecting presence of disease. Statistics in medicine, 21(6), 835-852.
sesp.diff.ci
, sesp.mcnemar
, and sesp.exactbinom
.
data(Paired1) # Hypothetical study data
ftable(Paired1)
paired.layout <- tab.paired(d=d, y1=y1, y2=y2, data=Paired1)
paired.layout
sesp.rel.results <- sesp.rel(paired.layout)
str(sesp.rel.results)
sesp.rel.results
Run the code above in your browser using DataLab