sep.var.se {RSurveillance} | R Documentation |
Population sensitivity for varying unit sensitivity
Description
Calculates population-level sensitivity where unit sensitivity varies and using the appropriate method, depending on whether or not N provided (hypergeometric if N provided, binomial otherwise), assuming perfect test specificity and representative sampling
Usage
sep.var.se(N = NA, se, pstar)
Arguments
N |
population size (number of units or clusters), N must be >= length(se)) or NA if unknown |
se |
vector of unit sensitivity values (proportion) for each unit sampled |
pstar |
specified design prevalence (scalar) |
Value
a scalar of population-level sensitivity
Examples
# examples of sep.var.se - checked
sens<- c(rep(0.9, 50), rep(0.95, 100))
sep.var.se(NA, sens, 0.01)
sep.var.se(se=sens, pstar=0.01)
sep.var.se(N=500, sens, 0.01)
sep.var.se(NA, runif(150, 0.95, 0.99), 0.02)
sep.var.se(500, runif(150, 0.95, 0.99), 0.02)
[Package RSurveillance version 0.2.1 Index]