compute_sample_size_vectorised {eufmdis.adapt}R Documentation

Compute sample size for freedom from disease (vectorised)

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. Vectorised version of compute_sample_size.

Usage

compute_sample_size_vectorised(N, prev, accuracy)

Arguments

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)

Details

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.

Value

Sample size (integer vector).

Author(s)

Ian Kopacka

See Also

compute_sample_size


[Package eufmdis.adapt version 0.1.0 Index]