sep.var.se: Population sensitivity for varying unit sensitivity

Description Usage Arguments Value Examples

View source: R/freedom_functions_1.R

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

1
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

1
2
3
4
5
6
7
# 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)

evansergeant/RSurveillance documentation built on Nov. 8, 2019, 1:32 a.m.