## EXAMPLE 1:
## A cross-sectional study is to be carried out to confirm the absence of
## disease using risk based sampling. The population of interest is comprised
## of individual sampling units managed within clusters.
## Clusters are stratified into 'high', 'medium' and 'low' risk areas
## where the cluster-level risk of disease in the high risk area compared
## with the low risk area is 5 and the cluster-level risk of disease in
## the medium risk area compared with the low risk area is 3.
## The proportions of the population at risk in the high, medium and low
## risk area are 0.10, 0.20 and 0.70, respectively. The proportion of samples
## taken from the high, medium and low risk areas will be 0.40, 0.40 and
## 0.20, respectively.
## You intend to use a test with diagnostic sensitivity of 0.90 and you'd
## like to take a sufficient number of samples to return a cluster-level
## sensitivity of 0.80 and a population-level (system) sensitivity of 0.95.
## How many units need to be sampled to meet the requirements of the study?
rr <- c(5,3,1)
ppr <- c(0.10,0.20,0.70)
spr <- c(0.40,0.40,0.20)
rsu.sssep.rb2st1rf(rr, ppr, spr, pstar.c = 0.01, se.c = 0.80,
pstar.u = 0.10, se.u = 0.90, se.p = 0.95)
## A total of 197 clusters needs to be sampled, 79 from the high risk area,
## 79 from the medium risk area and 39 from the low risk area. A total of
## 18 units should be sampled from each cluster, 3546 units in total.
Run the code above in your browser using DataLab