## EXAMPLE 1:
## Dairies are to be sampled to determine the proportion of herd managers
## using foot bathes. Herds are stratified according to size (small, medium,
## and large). The number of herds in each strata are 1500, 2500, and 4000
## (respectively). A review of the literature indicates that use of foot bathes
## on farms is in the order of 0.50, with the probability of usage increasing
## as herds get larger. How many dairies should be sampled?
strata.n <- c(1500, 2500, 4000)
strata.Py <- c(0.50, 0.60, 0.70)
epi.ssstrataestb(strata.n, strata.Py, epsilon = 0.20, error = "relative",
nfractional = FALSE, conf.level = 0.95)
## A total of 55 herds should be sampled: 11 small, 18 medium, and 28 large.
Run the code above in your browser using DataLab