sep.pooled: Pooled population sensitivity

Description Usage Arguments Value Examples

View source: R/freedom_functions_1.R

Description

Calculates population sensitivity (sep) and population specificity (spp) assuming pooled sampling and allowing for imperfect sensitivity and specificity of the pooled test

Usage

1
sep.pooled(r, k, pstar, pse, psp = 1)

Arguments

r

number of pools sampled (scalar or vector)

k

pool size (scalar or vector of same length as r)

pstar

design prevalence (scalar or vector of same length as r)

pse

pool-level sensitivity (scalar or vector of same length as r)

psp

pool-level specificity (scalar or vector of same length as r)

Value

list of 2 elements, vector of sep values and vector of spp values

Examples

1
2
3
4
5
# examples for sep.pooled
sep.pooled(60, 5, 0.01, 1, 1)
sep.pooled(4, 10, 0.1, 0.9, 1)
sep.pooled(1:10*5, 5, 0.02, 0.9, 0.99)
sep.pooled(10, 5, 0.05, c(0.8, 0.9, 0.95, 0.99), 1)

Example output

$sep
[1] 0.9509591

$spp
[1] 1

$sep
[1] 0.9706771

$spp
[1] 1

$sep
 [1] 0.3946345 0.6335326 0.7781533 0.8657016 0.9187004 0.9507840 0.9702064
 [8] 0.9819640 0.9890816 0.9933904

$spp
 [1] 0.9509900 0.9043821 0.8600584 0.8179069 0.7778214 0.7397004 0.7034477
 [8] 0.6689718 0.6361855 0.6050061

$sep
[1] 0.8641780 0.8973573 0.9110379 0.9207757

$spp
[1] 1

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