# NOT RUN {
## 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 cook
## 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.
# 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(b = 75, Py = 0.46, epsilon.r = 0.10, rho = 0.20,
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(b = c(75,35), Py = 0.46, epsilon.r = 0.10, rho = 0.20,
conf.level = 0.90)
## A total of 81 villages need to be sampled to meet the specifications
## of this study.
# }
Run the code above in your browser using DataLab