n.rb {RSurveillance} | R Documentation |
Risk-based sample size
Description
Calculates sample size for risk-based sampling for a single risk factor and using binomial method
Usage
n.rb(pstar, rr, ppr, spr, se, sep)
Arguments
pstar |
design prevalence (scalar) |
rr |
relative risk values (vector, length equal to the number of risk strata) |
ppr |
population proportions corresponding to rr values (vector of equal length to rr) |
spr |
planned surveillance proportion for each risk group (vector equal length to rr, ppr) |
se |
unit sensitivity (fixed or vector same length as rr, ppr, n) |
sep |
required population sensitivity (scalar) |
Value
list of 2 elements, a vector of sample sizes for each risk group a scalar of total sample size, a vector of EPI values and a vector of adjusted risks
Examples
# examples for n.rb
n.rb(0.1, c(5, 3, 1), c(0.1, 0.10, 0.80), c(0.5, 0.3, 0.2), 0.9, 0.95)
n.rb(0.01, c(5, 1), c(0.1, 0.9), c(0.8, 0.2), c(0.9, 0.95), 0.95)
[Package RSurveillance version 0.2.1 Index]