## EXAMPLE 1:
## Calculate the surveillance system sensitivity assuming one-stage risk-
## based sampling assuming a population comprised of high risk (n = 200
## clusters) and low risk (n = 1800 clusters) where the probability of
## disease in the high risk group is 5 times that of the low risk group.
## Four clusters will be sampled with n = 80, 30, 20 and 30 surveillance
## units within each cluster tested using a test with diagnostic sensitivity
## at the surveillance unit level of 0.92, 0.85, 0.92 and 0.85, respectively.
## Assume a design prevalence of 0.01.
rg <- c(1,1,2,2)
se.u <- c(0.92,0.85,0.92,0.85)
n <- c(80,30,20,30)
df <- data.frame(rg, se.u, n)
rsu.sep.rb(N = c(200,1800), rr = c(5,1), ppr = NA, df = df, pstar = 0.01,
method = "hypergeometric")
## The expected surveillance system sensitivity is 0.993.
## EXAMPLE 2:
## Recalculate, assuming that we don't know the size of the cluster population
## at risk.
## When the size of the cluster population at risk is unknown we set N = NA
## and enter values for ppr (the proportion of the population in each risk
## group). Assume (from above) that 0.10 of the cluster population are in the
## high risk group and 0.90 are in the low risk group.
rsu.sep.rb(N = NA, rr = c(5,1), ppr = c(0.10,0.90), df = df, pstar = 0.01,
method = "binomial")
## The expected surveillance system sensitivity is 0.980.
Run the code above in your browser using DataLab