## EXAMPLE 1:
## A bulk milk tank test has been developed to detect bovine tuberculosis
## (bTB) in dairy herds. The diagnostic sensitivity and specificity of the
## test is 0.714 and 0.981, respectively.
## If there are 9,000 dairy herds in the population of interest and of that
## group 15 are thought to be bTB positive how many false positive test
## results can be expected if all herds are tested on a single occasion?
epi.fpos(n = 9000, pstar = 15 / 9000, se.u = 0.714, sp.u = 0.981,
conf.level = 0.95)$false.pos
## If all 9,000 herds are tested on a single occasion we can expect 171
## (95% CI 146 to 197) false positive.
## How many false negatives are expected using this test regime?
epi.fpos(n = 9000, pstar = 15 / 9000, se.u = 0.714, sp.u = 0.981,
conf.level = 0.95)$false.neg
## If all 9,000 herds are tested on a single occasion we can expect 4
## (95% CI 1 to 9) false negatives.
Run the code above in your browser using DataLab