Skip to contents

Performs a test for differences in (positive and negative) predictive values of two binary diagnostic tests in a paired study design using relative predictive values, as proposed by Moskowitz and Pepe (2006).

Usage

pv.rpv(tab, alpha)

Arguments

tab

An object of class tab.paired.

alpha

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

Value

A list containing:

ppv

named vector containing test1 (the positive predictive value of test 1), test2 (the positive predictive value of test 2), rppv (the relative positive predictive value, computed as test2 / test1), se.log.rppv (the standard error of the logarithm of rppv), lcl.rppv (lower confidence limit of rppv), ucl.rppv (the upper confidence limit of rppv), the test.statistic and the corresponding p.value.

npv

named vector containing test1 (the negative predictive value of test 1), test2 (the negative predictive value of test 2), rnpv (the relative negative predictive value, computed as test2 / test1), se.log.rnpv (the standard error of the logarithm of rnpv), lcl.rnpv (the lower confidence limit of rnpv), ucl.rnpv (the upper confidence limit of rnpv), the test.statistic and the corresponding p.value.

Sigma

Estimated variance-covariance matrix for {log(relative positive predictive value), log(relative negative predictive value)}.

method

Name of the method used to compare predictive values, here “relative predictive values (rpv)”.

alpha

Significance level alpha used to compute 100(1-alpha)%-confidence intervals for rppv and rnpv, the default is 0.05.

References

Moskowitz, C.S., and Pepe, M.S. (2006). Comparing the predictive values of diagnostic tests: sample size and analysis for paired study designs. Clin Trials, 3(3):272-9.

See also

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
#> 
rpv.results <- pv.rpv(paired.layout)
str(rpv.results)
#> List of 5
#>  $ ppv   : Named num [1:8] 0.8254 0.8655 1.0486 0.0199 1.0085 ...
#>   ..- attr(*, "names")= chr [1:8] "test1" "test2" "rppv" "se.log.rppv" ...
#>  $ npv   : Named num [1:8] 0.7662 0.6541 0.8536 0.0378 0.7926 ...
#>   ..- attr(*, "names")= chr [1:8] "test1" "test2" "rnpv" "se.log.rnpv" ...
#>  $ Sigma : num [1:2, 1:2] 0.000397 0.000402 0.000402 0.001432
#>   ..- attr(*, "dimnames")=List of 2
#>   .. ..$ : chr [1:2] "log.rppv" "log.rnpv"
#>   .. ..$ : chr [1:2] "log.rppv" "log.rnpv"
#>  $ method: chr "relative predictive values (rpv)"
#>  $ alpha : num 0.05
rpv.results
#> $ppv
#>          test1          test2           rppv    se.log.rppv       lcl.rppv 
#>     0.82536383     0.86548223     1.04860694     0.01991247     1.00847050 
#>       ucl.rppv test.statistic        p.value 
#>     1.09034078     2.38355929     0.01714612 
#> 
#> $npv
#>          test1          test2           rnpv    se.log.rnpv       lcl.rnpv 
#>   7.662338e-01   6.540881e-01   8.536403e-01   3.783679e-02   7.926258e-01 
#>       ucl.rnpv test.statistic        p.value 
#>   9.193516e-01  -4.182314e+00   2.885568e-05 
#> 
#> $Sigma
#>              log.rppv     log.rnpv
#> log.rppv 0.0003965065 0.0004024578
#> log.rnpv 0.0004024578 0.0014316223
#> 
#> $method
#> [1] "relative predictive values (rpv)"
#> 
#> $alpha
#> [1] 0.05
#> 
rpv.results$ppv["p.value"]
#>    p.value 
#> 0.01714612