Learn R Programming

DTComPair (version 1.2.6)

read.tab.paired: Read in “tab.paired”-Objects

Description

Reads in objects of class tab.paired using cell frequencies.

Usage

read.tab.paired(d.a, d.b, d.c, d.d, nd.a, nd.b, nd.c, nd.d, testnames, ...)

Value

Returns a list of class tab.paired containing:

diseased

A contingency table (matrix) of test results among diseased subjects.

Test1 pos.Test1 neg.Total
Test 2 pos.d.ad.bd.a+d.b
Test 2 neg.d.cd.dd.c+d.d
Totald.a+d.cd.b+d.dd.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.and.bnd.a+nd.b
Test 2 neg.nd.cnd.dnd.c+nd.d
Totalnd.a+nd.cnd.b+nd.dnd.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.

...

Additional arguments (usually not required).

See Also

tab.paired, print.tab.paired, acc.paired, generate.paired.

Examples

Run this code
read.t2 <- read.tab.paired(321, 51, 730, 272, 
                           120, 8, 74, 109,
                           testnames=c("Test A", "Test B"))
class(read.t2)
read.t2
acc.paired(read.t2)

Run the code above in your browser using DataLab