Comparison of the accuracy of two tests using relative true positive and false positive fraction
Source:R/tpffpf.rel.R
tpffpf.rel.Rd
Calculates two-sided Wald confidence intervals and performs a Wald test for the relative true positive fraction (TPF) (sensitivity) and false positive fraction (FPF) (i.e., one minus specificity) of two binary diagnostic tests in a paired study design.
This function is primarily intended for the analysis of paired screen positive studies, i.e. those paired studies where the disease (outcome) is ascertained using the gold standard test only in subjects who screen positive to either or both diagnostic tests. However, this function can also be used with data from standard paired studies, i.e. where the gold standard test is applied to all subjects.
Value
A list containing:
- tpf
a named vector containing
rel.tpf
(the relative true positive fraction, Test2 vs. Test1),se.log.rel.tpf
(the standard error for log(rel.tpf
)),lcl.rel.tpf
(the lower confidence limit forrel.tpf
),ucl.rel.tpf
(the upper confidence limit forrel.tpf
), andpval.rel.tpf
(the p-value from the test for the null hypothesis: relative true positive fraction=1).- fpf
a named vector containing
rel.fpf
(the relative false positive fraction, Test2 vs. Test1),se.log.rel.fpf
(the standard error for log(rel.fpf
)),lcl.rel.fpf
(the lower confidence limit forrel.fpf
),ucl.rel.fpf
(the upper confidence limit forrel.fpf
), andpval.rel.fpf
(the p-value from the test for the null hypothesis: relative false positive fraction=1).- alpha
significance level alpha for 100(1-alpha)%-confidence intervals for
rel.tpf
andrel.fpf
.
Details
If relative true positive fraction>1, the percentage increase in true positive fraction for Test2 relative to Test1 is computed as 100(relative true positive fraction-1)%. If relative true positive fraction<1 the percentage decrease in true positive fraction for Test2 relative to Test1 is computed as 100(1-relative true positive fraction)%. Percentage increase/decrease in false positive fraction is computed in an analogous fashion.
Given the independence of relative TPR and relative TNR, a possible joint 100(1-alpha)% confidence region for {relative TPF, relative FPF}
is formed by the rectangle {lcl.rel.tpf
, ucl.rel.tpf
} x {lcl.rel.fpf
, ucl.rel.fpf
}, where {lcl.rel.tpf
, ucl.rel.tpf
} and
{lcl.rel.fpf
, ucl.rel.fpf
} are 100(1-alpha*)% confidence intervals for relative TPF and relative FPF, respectively, and alpha*=1-sqrt(1-alpha).
In screen positive studies, only relative TPF and relative FPF can be estimated from the data.
Their constituents, i.e. TPF and FPF for the two tests, are not estimable.
Relative specificity is not estimable either. Therefore, sesp.rel
should not
be used to attempt to estimate those quantities from studies with a paired screen positive design.
McNemar's test (sesp.mcnemar
) can, however, be used to test the null hypothesis of equality in specificities in
paired screen positive studies (Schatzkin et al., 1987).
References
Schatzkin, A., Connor, R. J., Taylor, P. R., & Bunnag, B. (1987). Comparing new and old screening tests when a reference procedure cannot be performed on all screenees: example of automated cytometry for early detection of cervical cancer. American Journal of Epidemiology, 125(4), 672-678.
Cheng, H., & Macaluso, M. (1997). Comparison of the accuracy of two tests with a confirmatory procedure limited to positive results. Epidemiology, 104-106.
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.
Examples
# Data from Cheng and Macaluso (Table 2)
breast.cancer.data <- read.tab.paired(
10, 24, 21, NA,
13, 144, 95, NA,
testnames=c("Mammography", "Physical examination")
)
breast.cancer.data
#> Two binary diagnostic tests (paired design)
#>
#> Test1: 'Mammography'
#> Test2: 'Physical examination'
#>
#> Diseased:
#> Test1 pos. Test1 neg. Total
#> Test2 pos. 10 24 34
#> Test2 neg. 21 NA NA
#> Total 31 NA NA
#>
#> Non-diseased:
#> Test1 pos. Test1 neg. Total
#> Test2 pos. 13 144 157
#> Test2 neg. 95 NA NA
#> Total 108 NA NA
#>
tpffpf.rel.results <- tpffpf.rel(breast.cancer.data)
str(tpffpf.rel.results)
#> List of 3
#> $ tpf : Named num [1:5] 1.097 0.207 0.732 1.644 0.655
#> ..- attr(*, "names")= chr [1:5] "rel.tpf" "se.log.rel.tpf" "lcl.rel.tpf" "ucl.rel.tpf" ...
#> $ fpf : Named num [1:5] 1.4537 0.11872 1.15191 1.83457 0.00163
#> ..- attr(*, "names")= chr [1:5] "rel.fpf" "se.log.rel.fpf" "lcl.rel.fpf" "ucl.rel.fpf" ...
#> $ alpha: num 0.05
tpffpf.rel.results
#> $tpf
#> rel.tpf se.log.rel.tpf lcl.rel.tpf ucl.rel.tpf pval.rel.tpf
#> 1.0967742 0.2066265 0.7315373 1.6443641 0.6548356
#>
#> $fpf
#> rel.fpf se.log.rel.fpf lcl.rel.fpf ucl.rel.fpf pval.rel.fpf
#> 1.453703704 0.118723652 1.151908920 1.834567318 0.001626358
#>
#> $alpha
#> [1] 0.05
#>