Compute sample size for a one stage freedom from disease survey for given
Population size, design prevalence and accuracy, assuming a perfect
diagnostic test. Vectorised version of compute_sample_size.
compute_sample_size_vectorised(N, prev, accuracy)Sample size (integer vector).
Integer vector containing the population sizes
Numeric between 0 and 1; design prevalence
Numeric between 0 and 1; accuracy of the survey (i.e. detection probability)
Ian Kopacka
Uses vapply to vectorise compute_sample_size over the
population size N. prev and accuracy must be scalars.
For the sake of efficiency, the sample size is only computed once for every
different value of N, even if they apper multiple times in the vector.
compute_sample_size