sesp.rel: Comparison of the accuracy of two tests using relative...

View source: R/sesp.rel.R

sesp.relR Documentation

Comparison of the accuracy of two tests using relative sensitivity and specificity

Description

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.

Usage

sesp.rel(tab, alpha)

Arguments

tab

an object of class tab.paired.

alpha

significance level alpha used to compute two-sided 100(1-alpha)%-confidence intervals, the default is 0.05.

Details

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.

Value

A list containing:

sensitivity

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).

specificity

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).

alpha

significance level alpha for 100(1-alpha)%-confidence intervals for rel.sens and rel.spec.

References

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.

See Also

sesp.diff.ci, sesp.mcnemar, and sesp.exactbinom.

Examples

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

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