Calculate the design prevalence required to achieve a desired herd or system (population) level sensitivity.
Inputs are the test or herd sensitivity for the sampling, sample size tested, population size (optional) and the required
herd or system sensitivity. 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 output is the design prevalence required to achieve the specified target herd or system sensitivity.
This design prevalence is an animal (unit) level prevalence for a target herd sensitivity, or a herd (cluster)
level prevalence for a target system (population) level sensitivity.
If the size of the population is provided, an additional output is the expected maximum number of
infected units in the population, for the given confidence level (population sensitivity) and assuming that
all samples tested are negative.
