## EXAMPLE 1:
## Three hundred samples are to be tested from a population of animals to
## confirm the absence of a disease. The total size of the population is
## unknown. Assuming a design prevalence of 0.01 and a test with
## diagnostic sensitivity of 0.95 will be used what is the sensitivity of
## disease detection at the population level?
rsu.sep.rs(N = NA, n = 300, pstar = 0.01, se.u = 0.95)
## The sensitivity of disease detection at the population level is 0.943.
## EXAMPLE 2:
## Thirty animals from five herds ranging in size from 80 to 100 head are to be
## sampled to confirm the absence of a disease. Assuming a design prevalence
## of 0.01 and a test with diagnostic sensitivity of 0.95 will be used, what
## is the sensitivity of disease detection for each herd?
N <- seq(from = 80, to = 100, by = 5)
n <- rep(30, times = length(N))
rsu.sep.rs(N = N, n = n, pstar = 0.01, se.u = 0.95)
## The sensitivity of disease detection for each herd ranges from 0.28 to
## 0.36.
Run the code above in your browser using DataLab