rsu.sep.rb2rf {epiR}R Documentation

Surveillance system sensitivity assuming risk-based sampling on two risk factors

Description

Calculates risk-based surveillance system (population-level) sensitivity with a two risk factors, assuming [one-stage] risk-based sampling and allowing unit sensitivity to vary among risk strata.

Usage

rsu.sep.rb2rf(N, n, rr1, ppr1, rr2, ppr2, pstar, se.u, method = "binomial")

Arguments

N

matrix of population sizes for each risk group. Rows = levels of rr1, columns = levels of rr2.

n

matrix of the number of surveillance units tested in each risk group. Rows = levels of rr1, columns = levels of rr2.

rr1

scalar or vector defining the first set of relative risk values.

ppr1

scalar or vector of the same length as that vector of rr1 defining the population proportions in each of the first risk strata. Proportions must sum to one. Ignored if method = "hypergeometric".

rr2

matrix defining the relative risks for the second risk factor. Rows = levels of rr1, columns = levels of rr2.

ppr2

matrix defining the population proportions in each of the second risk strata. Row proportions must sum to one. Rows = levels of rr1, columns = levels of rr2. Ignored if method = "hypergeometric".

pstar

scalar, defining the design prevalence.

se.u

scalar or vector of the same length as that vector of rr1 defining the unit sensitivity (which can vary across strata).

method

character string indicating the method to be used. Options are binomial or hypergeometric. See details, below.

Details

If method = binomial N is ignored and values for ppr need to be entered. Conversely, if method = hypergeometric, ppr is ignored and calculated from N.

Value

A list comprised of two elements:

se.p

scalar, surveillance system (population-level) sensitivity estimates.

epi

vector, effective probability of infection estimates.

adj.risk1

vector, adjusted relative risk estimates for the first risk factor.

adj.risk2

vector, adjusted relative risk estimates for the second risk factor.

Examples

## 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).


[Package epiR version 2.0.73 Index]