Generalized Score Statistic for Comparison of Predictive Values
pv.gs.Rd
Performs a test for differences in (positive and negative) predictive values of two binary diagnostic tests using a generalized score statistic proposed by Leisenring, Alonzo and Pepe (2000).
Arguments
- tab
An object of class
tab.paired
.
Value
A list containing:
- ppv
A list with
test1
(the positive predictive value of test 1),test2
(the positive predictive value of test 2),diff
(the difference in positive predictive values, computed astest2 - test1
), thetest.statistic
and the correspondingp.value
.- npv
A list with
test1
(the negative predictive value of test 1),test2
(the negative predictive value of test 2),diff
(the difference in negative predictive values, computed astest2 - test1
), thetest.statistic
and the correspondingp.value
.- method
The name of the method used to compare predictive values, here “generalized score statistic (gs)”.
References
Leisenring, W., Alonzo, T., and Pepe, M. S. (2000). Comparisons of predictive values of binary medical diagnostic tests for paired designs. Biometrics, 56(2):345-51.
Examples
data(Paired1) # Hypothetical study data
ftable(Paired1)
#> y2 0 1
#> d y1
#> 0 0 155 22
#> 1 53 31
#> 1 0 32 22
#> 1 78 319
paired.layout <- tab.paired(d=d, y1=y1, y2=y2, data=Paired1)
paired.layout
#> Two binary diagnostic tests (paired design)
#>
#> Test1: 'y1'
#> Test2: 'y2'
#>
#> Diseased:
#> Test1 pos. Test1 neg. Total
#> Test2 pos. 319 22 341
#> Test2 neg. 78 32 110
#> Total 397 54 451
#>
#> Non-diseased:
#> Test1 pos. Test1 neg. Total
#> Test2 pos. 31 22 53
#> Test2 neg. 53 155 208
#> Total 84 177 261
#>
gs.results <- pv.gs(paired.layout)
str(gs.results)
#> List of 3
#> $ ppv : Named num [1:5] 0.8254 0.8655 0.0401 5.7112 0.0169
#> ..- attr(*, "names")= chr [1:5] "test1" "test2" "diff" "test.statistic" ...
#> $ npv : Named num [1:5] 7.66e-01 6.54e-01 -1.12e-01 1.78e+01 2.47e-05
#> ..- attr(*, "names")= chr [1:5] "test1" "test2" "diff" "test.statistic" ...
#> $ method: chr "generalized score statistic (gs)"
gs.results
#> $ppv
#> test1 test2 diff test.statistic p.value
#> 0.82536383 0.86548223 0.04011841 5.71124070 0.01685662
#>
#> $npv
#> test1 test2 diff test.statistic p.value
#> 7.662338e-01 6.540881e-01 -1.121457e-01 1.778567e+01 2.472383e-05
#>
#> $method
#> [1] "generalized score statistic (gs)"
#>
gs.results$ppv["p.value"]
#> p.value
#> 0.01685662