tab.paired: Tabulate Results from Two Binary Diagnostic Tests in a Paired Study Design
Description
Produces contingency tables of results from two binary diagnostic tests evaluated in a paired study design.
Usage
tab.paired(d, y1, y2, data = NULL, testnames, ...)
Value
Returns a list of class tab.paired:
diseased
A contingency table (matrix) of test results among diseased subjects.
Test1 pos.
Test1 neg.
Total
Test2 pos.
...
...
...
Test2 neg.
...
...
...
Total
...
...
...
non.diseased
A contingency table (matrix) of test results among non-diseased subjects.
Test1 pos.
Test1 neg.
Total
Test2 pos.
...
...
...
Test2 neg.
...
...
...
Total
...
...
...
testnames
The names of the diagnostic tests.
Arguments
d
A numeric vector specifying the gold-standard results (1 = presence of disease, 0 = absence of disease).
y1
A numeric vector specifying the results of diagnostic test 1 (1 = positive, 0 = negative).
y2
A numeric vector specifying the results of diagnostic test 2 (1 = positive, 0 = negative).
data
An optional data frame, list or environment containing the required variables d, y1 and y2.
testnames
An optional vector specifying the names of diagnostic test 1 and diagnostic test 2, e.g. c("Test A","Test B"). If not supplied, the variable names are used as testnames.