tab.paired | R Documentation |
Produces contingency tables of results from two binary diagnostic tests evaluated in a paired study design.
tab.paired(d, y1, y2, data = NULL, testnames, ...)
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 |
testnames |
An optional vector specifying the names of diagnostic test 1 and diagnostic test 2, e.g. |
... |
Additional arguments (usually not required). |
Returns a list of class tab.paired
:
diseased |
A contingency table (matrix) of test results among diseased subjects.
| ||||||||||||||||
non.diseased |
A contingency table (matrix) of test results among non-diseased subjects.
| ||||||||||||||||
testnames |
The names of the diagnostic tests. |
Objects of class tab.paired
are essential arguments for various functions in the
DTComPair
-package.
print.tab.paired
,
read.tab.paired
,
tab.1test
.
data(Paired1) # Hypothetical study data
b <- tab.paired(d=d, y1=y1, y2=y2, data=Paired1)
str(b)
b$diseased
b$non.diseased
print(b)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.