Analyse data for a simple 2stage survey for demonstrating disease freedom.
This analysis calculates the overall system sensitivity for the survey and the
resulting probability of population freedom from disease. It assumes that a random sample of herds (or all herds) has been selected for testing
from the population and that a random sample of animals has been
tested within each selected herd. It also assumes that the test system has a specificity
of 100% (any positive results are further investigated to exclude false positives)
and that no positive results were recorded. The analysis adjusts for imperfect sensitivity
of the test used.
For this analysis, a fixed sample size per herd is assumed. If sample size varies
between herds use the alternative option,
which allows you to include individual herd testing data.
The analysis calculates both herd (the same for all herds) assuming binomial sampling (large
herd size relative to sample size). System level sensitivity calculation depends on the available data:
 where population size (number of herds) is unknown or not specified the binomial calculation (sampling with replacement) is used; or
 where population size (number of herds) is specified the hypergeometric approximation (sampling without replacement) is used.
Design prevalence (specified level of disease to be detected) must be specified
at both animal and herd levels. Animallevel design prevalence must be specified as a proportion.
Herdlevel design prevalence can be specified as either:
 a proportion of the population infected; or
 a specific (integer) number of herds or animals (within herds) infected.
Inputs
Inputs required include:
 animallevel design prevalence (as a proportion);
 herdlevel design prevalence and whether this is specified as a proportion or number of herds;
 the number of herds in the population (if known);
 the number of herds sampled;
 the number of animals sampledper herd;
 the estimated test sensitivity; and
 the assumed prior probability that the population is free of disease.
Outputs
Outputs from the analysis include:
 The herdlevel sensitivity (SeH) for each herd tested;
 Overall system sensitivity (probability of detecting disease if it was present at the
specified animal and herdlevel design prevalences); and
 Probability of freedom of the population from disease (at the
specified animal and herdlevel design prevalences,
