## EXAMPLE 1:
## A cross-sectional study is to be carried out to confirm the absence of
## disease using risk based sampling. Assume a design prevalence of 0.01
## at the surveillance unit level. Surveillance units are categorised as
## being either high or low risk with the probability of disease for
## high risk surveillance units 3 times the probability of disease for low
## risk units. The proportion of units in each risk group is 0.20 and 0.80,
## respectively.
## Within each of the two risk categories the probability of disease varies
## with age with younger age groups having four times the risk of disease
## as older age groups. In the high risk area 10% of the population are young
## and 90% are old. In the low risk area 30% of the population are young and
## 70% are old.
## The total number of surveillance units in the population is unknown. The
## numbers of young and old surveillance units tested in the high and low risk
## groups are 40, 20, 20 and 10, respectively. You intend to use a test with
## diagnostic sensitivity of 0.80. What is the surveillance system sensitivity?
rsu.sep.rb2rf(N = NA, n = rbind(c(40,20), c(20,10)),
rr1 = c(3,1),
ppr1 = c(0.20,0.80),
rr2 = rbind(c(4,1), c(4,1)),
ppr2 = rbind(c(0.10,0.90), c(0.30,0.70)),
pstar = 0.01,
se.u = 0.80, method = "binomial")$se.p
## The surveillance system sensitivity is 0.93.
## EXAMPLE 2:
## This example shows the importance of sampling high risk groups. Take the
## same scenario as above but switch the relative proportions sampled by
## risk group --- taking a greater number of samples from the low risk group
## compared with the high risk group:
rsu.sep.rb2rf(N = NA, n = rbind(c(10,20), c(20,40)),
rr1 = c(3,1),
ppr1 = c(0.20,0.80),
rr2 = rbind(c(4,1), c(4,1)),
ppr2 = rbind(c(0.10,0.90), c(0.30,0.70)),
pstar = 0.01,
se.u = 0.80, method = "binomial")$se.p
## The surveillance system sensitivity is 0.69. Here we've taken exactly the
## same number of samples as Example 1, but there's a substantial decrease
## in surveillance system sensitivity because we've concentrated sampling on
## a low risk group (decreasing our ability to detect disease).
Run the code above in your browser using DataLab