Calculate the sample size required to achieve a desired level of confidence of population freedom. Can be applied at the herd level
or population level. If applied at the herd level, sensitivity and design prevalence are unit (animal) level values, whereas if applied
at the population level, sensitivity and design prevalence are cluster (herd/flock) level values.
Inputs are:
 the test or herd sensitivity for the sampling;
 prior confidence of freedom (from previous analyses or opinion);
 probability of introduction of disease during the surveillance period;
 the required level of confidence of freedom after the additional surveillance;
 population size (optional); and
 the design prevalence as either a proportion or number of units/clusters.
Enter test sensitivity if the target is a herd (cluster) level sensitivity or herdsensitivity
if the target is a system or population level sensitivity. If population size is entered the hypergeometric approximation
is used, otherwise the calculation is based on the binomial distribution.
The main outputs are:
 the the adjusted prior confidence of freedom (taking into account the probability of introduction
while the surveillance is being undertaken);
 the target herd or system sensitivity required to achieve the required confidence
of freedom; and
 the sample size required to achieve the target herd or system sensitivity.
