## EXAMPLE 1:
## A cross-sectional study is to be carried out to confirm the absence of
## brucellosis in dairy herds using a bulk milk tank test assuming a design
## prevalence of 0.05. Assume the total number of dairy herds in your study
## area is 5000 and the bulk milk tank test to be used has a diagnostic
## sensitivity of 0.95 and a specificity of 1.00. How many herds need to be
## sampled to be 95% certain that the prevalence of brucellosis in dairy herds
## is less than the design prevalence if less than a specified number of
## tests return a positive result?
rsu.sssep.rsfreecalc(N = 5000, pstar = 0.05, mse.p = 0.95, msp.p = 0.95,
se.u = 0.95, sp.u = 0.98, method = "hypergeometric", max.ss = 32000)$summary
## A system sensitivity of 95% is achieved with a total sample size of 194
## herds, assuming a cut-point of 7 or more positive herds are required to
## return a positive survey result.
Run the code above in your browser using DataLab