sep.rb2.binom: Binomial risk-based population sensitivity for 2 risk factors

Description Usage Arguments Value Examples

View source: R/risk_based_functions.R

Description

Calculates risk-based population sensitivity for two risk factors, using binomial method (assumes a large population)

Usage

1
sep.rb2.binom(pstar, rr1, ppr1, rr2, ppr2, n, se)

Arguments

pstar

design prevalence (scalar)

rr1

relative risks for first level risk factor (vector of values corresponding to the number of risk strata)

ppr1

population proportions for first level risk factor (vector of same length as rr1)

rr2

relative risks for second level risk factor, matrix, rows = levels of rr1, cols = levels of rr2

ppr2

population proportions for second level risk factor, matrix, rows = levels of rr1, cols = levels of rr2

n

matrix of number tested for each risk group (rows = levels of rr1, cols = levels of rr2)

se

test unit sensitivity (scalar)

Value

list of 4 elements, a scalar of population-level sensitivity a matrix of EPI values, a vector of corresponding Adjusted risks for the first risk factor and a matrix of adjusted risks for the second risk factor

Examples

1
2
3
4
5
6
7
8
9
# examples for sep.rb2.binom
pstar<- 0.01
rr1<- c(3, 1)
ppr1<- c(0.2, 0.8)
rr2<- rbind(c(4,1), c(4,1))
ppr2<- rbind(c(0.1, 0.9), c(0.3, 0.7))
se<- 0.8
n<- rbind(c(50, 20), c(20, 10))
sep.rb2.binom(pstar, rr1, ppr1, rr2, ppr2, n, se)

RSurveillance documentation built on July 2, 2020, 2:33 a.m.