Learn R Programming

clust.bin.pair (version 0.1.2)

thyroids: PET and SPECT data for diagnosing hyperparathyroidism

Description

Following surgery which confirmed the absence of hyperparathyroidism two diagnostic tests, PET and SPECT, were performed. Their measures of true negatives and false positives are reported. Data reported in Obuchowki 1998.

Usage

data(thyroids)

Arguments

Format

A data frame with 21 rows and 6 variables:

patient

ID of the patient

n.glands

number of glands tested from the patient

n.pet

number of true negatives from the PET test

x.pet

individual results per gland from the PET test

n.spect

number of true negatives from the SPECT test

x.spect

individual results per gland from the SPECT test

Examples

Run this code
# NOT RUN {
data(thyroids)

thyroids$n.glands == sapply(thyroids$x.pet, length)
thyroids$n.glands == sapply(thyroids$x.spect, length)

thyroids$n.pet   == sapply(thyroids$x.pet,   function(x) length(which(x == 1)))
thyroids$n.spect == sapply(thyroids$x.spect, function(x) length(which(x == 1)))

tc <- nested.to.contingency(thyroids$x.pet, thyroids$x.spect)

clust.bin.pair(tc[,'ak'], tc[,'bk'], tc[,'ck'], tc[,'dk'], method="obuchowski")

do.call(clust.bin.pair, data.frame(tc))
# }

Run the code above in your browser using DataLab