read.tab.paired: Read in "tab.paired"-Objects

View source: R/DTComPair.R

read.tab.pairedR Documentation

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, ...)

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).

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.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.

Note

Objects of class tab.paired are essential arguments for various functions in the DTComPair-package.

See Also

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

Examples

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)

DTComPair documentation built on Aug. 20, 2023, 5:06 p.m.