Learn R Programming

DTComPair (version 1.2.6)

generate.paired: Generate Dataset from “tab.paired”-Object

Description

Generates a dataset from contingency tables of binary diagnostic test results in a paired study design.

Usage

generate.paired(tab, ...)

Value

A dataframe containing:

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

Arguments

tab

An object of class tab.paired.

...

Additional arguments (usually not required).

See Also

tab.paired and read.tab.paired.

Examples

Run this code
data(Paired1) # Hypothetical study data
ftable(Paired1)
paired.layout <- tab.paired(d=d, y1=y1, y2=y2, data=Paired1)
new.df <- generate.paired(paired.layout)
head(new.df)
ftable(new.df)

Run the code above in your browser using DataLab