This utility calculates the sample size required to estimate true prevalence
with a specified level of confidence and precision, assuming a test with imperfect
sensitivity and/or specificity. The same method applies for estimating both animal and
herdlevel prevalence, with herdsensitivity and herdspecificity substituted for
animallevel values to estimate true herdprevalence. The method is as described by:
Humphry RW, Cameron A, Gunn GJ, 2004. A practical approach to calculate sample size for
herd prevalence surveys. Prev. Vet. Med. 65: 173188. Adjustment for finite
population size is described by Thrusfield M, 2005. Veterinary Epidemiology, 3rd Edition,
Blackwell Science, Oxford, UK (p 233234).
Inputs are the assumed true prevalence, the desired level of confidence,
the desired precision of the estimate and the assumed values for sensitivity and
specificity of the testing regimen used. The desired precision of the estimate
(also sometimes called the allowable or acceptable error in the estimate) is half the width of the desired
confidence interval. For example if you would like the confidence interval width to be about
0.1 (10%) you would enter a precision of +/ 0.05 (5%).
To calculate sample size for herdprevalence estimation, use herdlevel values for
assumed prevalence, sensitivity and specificity instead of animallevel values.
Sample size is calculated for an assumed large (infinite) population. If the optional
population size is provided the sample size estimate is adjusted for the population specified.
The program outputs the sample size required to estimate the true prevalence with the
desired precision and confidence. Tables of sample sizes for a range of values for prevalence
and precision and for sensitivity and specificity are also produced.
