Learn R Programming

testCompareR (version 1.1.0)

dataframeR: dataframeR

Description

Produces a data frame which can be used by the compareR function using values commonly found in published literature. Useful for reviews and meta-analyses.

Usage

dataframeR(s11, s10, s01, s00, r11, r10, r01, r00)

Value

A data frame populated with zeros and ones indicating positive or negative test results which can be passed to the compareR function.

Arguments

s11

Number of cases where Test 1 is positive, Test 2 is positive and gold standard is positive.

s10

Number of cases where Test 1 is positive, Test 2 is negative and gold standard is positive.

s01

Number of cases where Test 1 is negative, Test 2 is positive and gold standard is positive.

s00

Number of cases where Test 1 is negative, Test 2 is negative and gold standard is positive.

r11

Number of cases where Test 1 is positive, Test 2 is positive and gold standard is negative.

r10

Number of cases where Test 1 is positive, Test 2 is negative and gold standard is negative.

r01

Number of cases where Test 1 is negative, Test 2 is positive and gold standard is negative.

r00

Number of cases where Test 1 is negative, Test 2 is negative and gold standard is negative.

Details

Understanding the parameter names: s & r represent positive and negative results for the gold standard test, respectively. The first digit represents a positive (1) or negative (0) result for Test 1. The second digit represents a positive (1) or negative (0) result for Test 2.

Examples

Run this code
# build data frame using numbers
dataframeR(3, 3, 3, 3, 3, 3, 3, 3)

Run the code above in your browser using DataLab