Counts the numbers of discordance and concordance of two tests

Share:

Description

In the case two dependent tests shall be compared a fourfold table is mostly needed. count.fourfold counts the numbers of concordance and discordance of both tests.

Usage

1
count.fourfold(data, col.test1, col.test2)

Arguments

data

name of the data

col.test1

number of column representing the first test

col.test2

number of column representing the second test

Value

A vector containing the four entries of the fourfold table, row wise listed

Author(s)

Daniela Wenzel, Antonia Zapf

Examples

1
2
3
4
5
6
7
# create a data set with zero and ones for each of both tests
v1=c(rep(1,10),rep(0,4),rep(1,8),rep(0,8))
v2=c(rep(0,10),rep(1,5),rep(0,5),rep(1,10))
n=c(seq(1,30,1))
new=cbind(n,v1,v2)
# count the number of concordance and discordance
count.fourfold(new,1,2)