## EXAMPLE 1:
## Prior surveillance activities and expert opinion lead you to believe that
## there's a 75% chance that your country is free of disease X. To confirm
## your country's disease freedom status you intend to use a test at the herd
## level which has a diagnostic sensitivity of 0.95. The probability of
## disease introduction during the time period of interest is relatively
## low, say 0.01. How many herds need to be sampled to be 95% confident
## that the country is free of disease X assuming a design prevalence of
## 0.01?
rsu.sspfree.rs(N = NA, prior = 0.75, p.intro = 0.01, pstar = 0.01,
pfree = 0.95, se.u = 0.95)
## A total of 198 herds need to be sampled to meet the requirements of the
## study.
Run the code above in your browser using DataLab