compute_sample_size: Compute sample size for freedom from disease
Description
Compute sample size for a one stage freedom from disease survey for given
Population size, design prevalence and accuracy, assuming a perfect
diagnostic test.
Usage
compute_sample_size(N, prev, accuracy)
Value
Sample size (integer).
Arguments
- N
Integer containing the Size of the population
- prev
Numeric between 0 and 1; design prevalence
- accuracy
Numeric between 0 and 1; accuracy of the survey (i.e.
detection probability)
Details
The function finds the optimal sample size using a bisection method.