Learn R Programming

RSurveillance (version 0.2.1)

sph.hp: Hypergeometric population specificity calculation

Description

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

Usage

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

Run this code
# NOT RUN {
# 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)
# }

Run the code above in your browser using DataLab