Learn R Programming

DTComPair (version 1.2.6)

pv.wgs: Weighted Generalized Score Statistic for Comparison of Predictive Values

Description

Performs a test for differences in (positive and negative) predictive values of two binary diagnostic tests using a weighted generalized score statistic proposed by Kosinski (2013).

Usage

pv.wgs(tab)

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 as test2 - test1, the test.statistic and the corresponding p.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 as test2 - test1, the test.statistic and the corresponding p.value.

method

The name of the method used to compare predictive values, here “weighted generalized score statistic (wgs)”.

Arguments

tab

An object of class tab.paired.

References

Kosinski, A.S. (2013). A weighted generalized score statistic for comparison of predictive values of diagnostic tests. Stat Med, 32(6):964-77.

See Also

pv.gs and pv.rpv.

Examples

Run this code
data(Paired1) # Hypothetical study data
ftable(Paired1)
paired.layout <- tab.paired(d=d, y1=y1, y2=y2, data=Paired1)
paired.layout 
wgs.results <- pv.wgs(paired.layout)
str(wgs.results)
wgs.results
wgs.results$ppv["p.value"]

Run the code above in your browser using DataLab