A contingency table (matrix) of test results among diseased subjects.
Test1 pos.
Test1 neg.
Total
Test 2 pos.
d.a
d.b
d.a+d.b
Test 2 neg.
d.c
d.d
d.c+d.d
Total
d.a+d.c
d.b+d.d
d.a+d.b+d.c+d.d
non.diseased
A contingency table (matrix) of test results among non-diseased subjects.
Test1 pos.
Test1 neg.
Total
Test 2 pos.
nd.a
nd.b
nd.a+nd.b
Test 2 neg.
nd.c
nd.d
nd.c+nd.d
Total
nd.a+nd.c
nd.b+nd.d
nd.a+nd.b+nd.c+nd.d
testnames
The names of the diagnostic tests.
Arguments
d.a
The number of diseased subjects with a positive test 1 and a positive test 2.
d.b
The number of diseased subjects with a negative test 1 and a positive test 2.
d.c
The number of diseased subjects with a positive test 1 and a negative test 2.
d.d
The number of diseased subjects with a negative test 1 and a negative test 2.
nd.a
The number of non-diseased subjects with a positive test 1 and a positive test 2.
nd.b
The number of non-diseased subjects with a negative test 1 and a positive test 2.
nd.c
The number of non-diseased subjects with a positive test 1 and a negative test 2.
nd.d
The number of non-diseased subjects with a negative test 1 and a negative test 2.
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.