Last data update: 2014.03.03

R: Read in "tab.1test"-Objects
read.tab.1testR Documentation

Read in “tab.1test”-Objects

Description

Reads in objects of class tab.1test using cell frequencies.

Usage

read.tab.1test(a, b, c, d, testname, ...)

Arguments

a

The number of diseased subjects with a positive test.

b

The number of non-diseased subjects with a positive test.

c

The number of diseased subjects with a negative test.

d

The number of non-diseased subjects with a negative test.

testname

An optional vector specifying the name of the diagnostic test, e.g. c("Test A"). If not supplied, the corresponding variable name is used as testname.

...

Additional arguments (usually not required).

Value

Returns a list of class tab.1test containing:

tab.1test

A contingency table (matrix) of test results.

Diseased Non-diseased Total
Test pos. a b a+b
Test neg. c d c+d
Total a+c b+d a+b+c+d
testname

The name of the diagnostic test.

Note

Objects of class tab.1test are required as arguments for acc.1test, a function to compute the accuracy of a binary diagnostic test.

See Also

tab.1test, print.tab.1test, acc.1test.

Examples

read.t1 <- read.tab.1test(321, 51, 730, 272, testname="Test1")
class(read.t1)
read.t1
acc.1test(read.t1)

Results


R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(DTComPair)
Loading required package: gee
Loading required package: PropCIs
> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/DTComPair/read.tab.1test.Rd_%03d_medium.png", width=480, height=480)
> ### Name: read.tab.1test
> ### Title: Read in "tab.1test"-Objects
> ### Aliases: read.tab.1test
> 
> ### ** Examples
> 
> read.t1 <- read.tab.1test(321, 51, 730, 272, testname="Test1")
> class(read.t1)
[1] "tab.1test"
> read.t1
Binary diagnostic test 'Test1'

          Diseased Non-diseased Total
Test pos.      321           51   372
Test neg.      730          272  1002
Total         1051          323  1374
> acc.1test(read.t1)
Diagnostic accuracy of test 'Test1'

(Estimates, standard errors and 95%-confidence intervals)

                 Est.         SE  Lower CL  Upper CL
Sensitivity 0.3054234 0.01420725 0.2775777 0.3332691
Specificity 0.8421053 0.02028924 0.8023391 0.8818714
PPV         0.8629032 0.01783295 0.8279513 0.8978552
NPV         0.2714571 0.01404896 0.2439216 0.2989925

           Est.   SE (log)  Lower CL  Upper CL
PDLR  1.9343482 0.13665891 1.4798251 2.5284766
NDLR  0.8248097 0.03160512 0.7752672 0.8775181
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>