## EXAMPLE 1 (from Georgiadis et al. 2005, pp. 5):
## Nielsen et al. (2002) present data from the evaluation of a milk
## antibody ELISA and faecal culture for the diagnosis of Mycobacterium avium
## subsp. paratuberculosis infection in cattle. Because the ELISA detects
## antibodies and culture is based on isolation of the bacterium in faeces
## we can reasonably assume that the two tests are conditionally independent.
## How many cattle need to be sampled if we wanted to be 95% certain that
## our estimate of diagnostic sensitivity and specificity of the two tests
## is within 0.05 of the true population value assuming the number sampled
## in the second population divided by the number sampled in the first
## population is 0.817? The prevalence of Mycobacterium avium subsp.
## paratuberculosis is thought to be 0.093 and 0.204, respectively. Assume
## the sensitivity of the the ELISA and faecal culture is 0.349 and 0.534,
## respectively. Assume the specificity of the ELISA and faecal culture is
## 0.995 and 0.894, respectively.
epi.ssdxtest(pi = c(0.093,0.204), se = c(0.349,0.534), sp = c(0.995,0.894),
epsilon.api = c(0.05,0.05), epsilon.ase = c(0.05,0.05),
epsilon.asp = c(0.05,0.05), epsilon.asesp = c(0.05,0.05),
r = 0.817, nfractional = FALSE, verbose = FALSE, conf.level = 0.95)
## A total of 63,887 cattle need to be sampled (35,161 from population 1 and
## 28,726 from population 2) to meet the requirements of the study.
Run the code above in your browser using DataLab