## EXAMPLE 1:
## A cross-sectional study is to be carried out to confirm the absence of
## disease using one-stage risk based sampling. Assume a design prevalence of
## 0.10 at the cluster (herd) level and the total number of clusters in
## the population is unknown. Clusters are categorised as being either high,
## medium or low risk with the probability of disease for clusters in the
## high and medium risk area 5 and 3 times the probability of disease in the
## low risk area. The proportions of clusters in the high, medium and low risk
## area are 0.10, 0.10 and 0.80, respectively and you elect to sample five
## clusters from each of the three areas using a test with diagnostic
## sensitivity of 0.90. What is the surveillance system sensitivity?
rsu.sep.rb1rf(N = NA, n = c(5,5,5), rr = c(5,3,1), ppr = c(0.10,0.10,0.80),
pstar = 0.10, se.u = 0.90, method = "binomial")
## The surveillance system sensitivity is 0.94.
## EXAMPLE 2:
## Same scenario as above, but this time assume we know how many clusters are
## in the high, medium and low risk areas: 10, 10 and 80, respectively. What is
## the surveillance system sensitivity?
rsu.sep.rb1rf(N = c(10,10,80), n = c(5,5,5), rr = c(5,3,1), ppr = NA,
pstar = 0.10, se.u = 0.90, method = "hypergeometric")
## The surveillance system sensitivity is 0.96, almost identical to that
## calculated above where the binomial distribution was used to account for
## not knowing the size of the cluster population at risk.
Run the code above in your browser using DataLab