Calculate sample sizes for 2stage surveys for demonstrating disease freedom,
for specified target clusterlevel sensitivity and system (population) sensitivity.
This analysis calculates the number of clusters and the number of units within each cluster
to be tested to provide specified cluster and system sensitivities (probability of detecting disease)
for the given unit and clusterlevel design prevalences and test sensitivity. Test
specificity is assumed to be 100% (or followup testing of any positive will be undertaken
to confirm or exclude disease).
Numbers of clusters to test are calculated using the hypergeometric apprximation if the
number of clusters in the population is specified as well as using the binomial fomula assuming unknown (large)
number of clusters in the population. If the population size is not specified only the binomial results are presented.
Numbers of units to test in each cluster are calculated for a range of cluster sizes using the hypergeometric
approximation and for unknown (large) cluster sizes using the binomial calculation.
Design prevalence (specified level of disease to be detected) must be specified
at both unit and cluster levels. Design prevalence can be specified as either:
 a proportion of the population infected; or
 a specific (integer) number of units or clusters infected. For clusterprevalence,
the number of clusters in the population must be specified if design prevalence is specified as an integer.
Inputs
Inputs required include:
 unitlevel design prevalence as either a proportion or an integer number of units;
 clusterlevel design prevalence as either a proportion or an integer number of clusters;
 the estimated test sensitivity;
 the target clusterlevel sensitivity (SeH) which is the probability of detecting
disease if it is present in a cluster at the specified unitlevel design prevalence;
 the target system sensitivity (SSe) which is the probability of detecting
disease if it is present in the population at the specified unit and cluster level design prevalences;
 The number of clusters in the population (optional).
Outputs
Outputs from the analysis include:
 The total numbers of clusters to be sampled;
 The maximum total sample size;
 The numbers of units to test in each cluster, for a range of cluster sizes to achieve the specified
value for SeH; and
 The numbers of units to test in cluster and the corresponding numbers of clusters to test,
for a range of cluster sizes and SeH values.
Note:
 If it is not possible to achieve the desired cluster sensitivity by testing
all units in a cluster of given size, the sample size is left blank;
 If unitlevel prevalence is specified as a number of units, sample size
for an unknown cluster size cannot be calculated;
 If clusterlevel prevalence is specified as a number of clusters, the number of clusters
to be sampled for a large or unknown population cannot be calculated and
population size must be specified.
