View source: R/rsu.sssep.rb2st1rf.R
rsu.sssep.rb2st1rf | R Documentation |
Calculates the sample size to achieve a desired surveillance system sensitivity assuming risk-based 2-stage sampling on one risk factor at the cluster level, imperfect test sensitivity and perfect test specificity.
rsu.sssep.rb2st1rf(rr, ppr, spr, pstar.c, se.c, pstar.u, se.u, se.p)
rr |
vector, defining the relative risk values for each strata in the population. |
ppr |
vector of length |
spr |
vector of length |
pstar.c |
scalar (either a proportion or integer) defining the cluster level design prevalence. |
se.c |
scalar proportion, defining the desired cluster level sensitivity. |
pstar.u |
scalar (either a proportion or integer) defining the surveillance unit level design prevalence. |
se.u |
scalar (0 to 1) representing the sensitivity of the diagnostic test at the surveillance unit level. |
se.p |
scalar (0 to 1) representing the desired surveillance system (population-level) sensitivity. |
A list comprised of seven elements:
n.clusters |
scalar, the total number of clusters to be sampled. |
n.clusters.per.strata |
a vector of the same length as |
n.units |
scalar, the total number of units to be sampled. |
n.units.per.strata |
a vector of the same length of |
n.units.per.cluster |
scalar, the number of units to be sampled from each cluster. |
epinf |
a vector of the same length of |
adj.risk |
a vector of the same length of |
## 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.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.