## EXAMPLE 1:
## Thirty animals from a herd of 150 are to be tested using a test with
## diagnostic sensitivity 0.90 and specificity 0.98. What is the
## surveillance system sensitivity assuming a design prevalence of 0.10 and
## two or more positive tests will be interpreted as a positive result?
rsu.sep.rsfreecalc(N = 150, n = 30, c = 2, pstar = 0.10,
se.u = 0.90, sp.u = 0.98)
## If a random sample of 30 animals is taken from a population of 150 and
## a positive test result is defined as two or more individuals returning
## a positive test, the probability of detecting disease if the population is
## diseased at a prevalence of 0.10 is 0.87.
## EXAMPLE 2:
## Repeat these calculations assuming herd size is unknown:
rsu.sep.rsfreecalc(N = NA, n = 30, c = 2, pstar = 0.10,
se.u = 0.90, sp.u = 0.98)
## If a random sample of 30 animals is taken from a population of unknown size
## and a positive test result is defined as two or more individuals returning
## a positive test, the probability of detecting disease if the population is
## diseased at a prevalence of 0.10 is 0.85.
Run the code above in your browser using DataLab