## EXAMPLE 1:
## We want to test dairy herds for Johne's disease using faecal culture
## which has a diagnostic sensitivity and specificity of 0.647 and
## 0.981, respectively. Suppose faecal samples from five cows are pooled
## and we collect six pooled samples per herd. What is the herd level
## sensitivity and specificity using this approach assuming the true prevalence
## of disease is 0.12 and there are no dilution effects arising from pooling.
epi.pooled(Se = 0.647, Sp = 0.981, P = 0.12, m = 5 , r = 6, dilution = FALSE)
## Herd level sensitivity is 0.927, herd level specificity is 0.562.
## Sensitivity at the herd level is increased using the pooled sampling
## approach. Herd level specificity is decreased.
## Re-calculate herd level sensitivity and specificity assuming there is a
## dilution effect arising from pooling:
epi.pooled(Se = 0.647, Sp = 0.981, P = 0.12, m = 5 , r = 6, dilution = TRUE)
## Herd level sensitivity is 0.943, herd level specificity is 0.562.
Run the code above in your browser using DataLab