sph.hp: Hypergeometric population specificity calculation

Description Usage Arguments Value Examples

View source: R/freedom_functions_2.R

Description

Calculates population specificity for a finite population and imperfect test, using Hypergeometric distribution

Usage

1
sph.hp(N, n, c = 1, sp)

Arguments

N

population size (scalar or vector of same length as n)

n

sample size (scalar or vector)

c

The cut-point number of positives to classify a cluster as positive, default=1, if positives < c result is negative, >= c is positive (scalar or vector of same length as n)

sp

test unit specificity (scalar or vector of same length as n)

Value

a vector of population-level specificities

Examples

1
2
3
4
5
# examples of sph.hp
sph.hp(150, 30, 2, 0.98)
sph.hp(150, 30, 1, 0.98)
sph.hp(150, 1:5*10, 2, 0.98)
sph.hp(500, 30, 2, 95:100/100)

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