View source: R/compute_sample_size_vectorised.R
| compute_sample_size_vectorised | R Documentation |
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)
N |
Integer vector containing the population sizes |
prev |
Numeric between 0 and 1; design prevalence |
accuracy |
Numeric between 0 and 1; accuracy of the survey (i.e. detection probability) |
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.
Sample size (integer vector).
Ian Kopacka
compute_sample_size
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.