tab.1test: Tabulate Single Binary Diagnostic Test vs. Gold-Standard
Description
Produces a contingency table of results from a single binary diagnostic test vs. the gold-standard results.
Usage
tab.1test(d, y, data = NULL, testname, ...)
Value
Returns a list of class tab.1test:
tab.1test
A contingency table (matrix) of test results.
Diseased
Non-diseased
Total
Test pos.
...
...
...
Test neg.
...
...
...
Total
...
...
...
testname
The name of the diagnostic test.
Arguments
d
A numeric vector specifying the gold-standard results (1 = presence of disease, 0 = absence of disease).
y
A numeric vector specifying the results of the diagnostic test (1 = positive, 0 = negative).
data
An optional data frame, list or environment containing the required variables d and y.
testname
An optional character variable specifying the name of the diagnostic test, e.g. c("Test A"). If not supplied, the variable name is used as the testname.