## EXAMPLE 1:
## An aid project has distributed cook stoves in a single province in a
## resource-poor country. At the end of three years, the donors would like
## to know what proportion of households are still using their donated
## stove. A cross-sectional study is planned where villages in the province
## will be sampled and all households (approximately 75 per village) will be
## visited to determine whether or not the donated stove is still in use.
## A pilot study of the prevalence of stove usage in five villages
## showed that 0.46 of householders were still using their stove. The
## intracluster correlation for a study of this type is unknown, but thought
## to be relatively high (rho = 0.20).
# If the donor wanted to be 90% confident that the survey estimate of stove
## usage was within 10% of the true population value, how many villages
## (i.e., clusters) would need to be sampled?
epi.ssclus1estb(N.psu = NA, b = 75, Py = 0.46, epsilon = 0.10,
error = "relative", rho = 0.20, nfractional = FALSE, conf.level = 0.90)
## A total of 67 villages need to be sampled to meet the specifications
## of this study.
## Now imagine the situation where the number of households per village
## varies. We are told that the average number of households per village is
## 75 with the 0.025 quartile 40 households and the 0.975 quartile 180
## households. The expected standard deviation of the number of households
## per village is (180 - 40) / 4 = 35. How many villages need to be sampled?
epi.ssclus1estb(N.psu = NA, b = c(75,35), Py = 0.46, epsilon = 0.10,
error = "relative", rho = 0.20, nfractional = FALSE, conf.level = 0.90)
## A total of 81 villages need to be sampled to meet the specifications
## of this study.
## Now imagine the situation where this study is to be carried out on a
## remote island where the total number of villages is 220. Recalculate
## your sample size.
epi.ssclus1estb(N.psu = 220, b = c(75,35), Py = 0.46, epsilon = 0.10,
error = "relative", rho = 0.20, nfractional = FALSE, conf.level = 0.90)
## A total of 60 villages need to be sampled to meet the specifications
## of this study.
Run the code above in your browser using DataLab