sph.binom: Binomial population specificity for imperfect test

Description Usage Arguments Value Examples

View source: R/freedom_functions_2.R

Description

Calculates population specificity for a large or unknown population, using the Binomial distribution and adjusting for cut-point number of positives

Usage

1
sph.binom(n, c = 1, sp)

Arguments

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
6
7
# examples for sph.imperfect.sp
sph.binom(30, 2, 0.98)
sph.binom(30, 1, 0.98)
sph.binom(1:5*10, 2, 0.98)
sph.binom(100, 1:5, 0.98)
sph.binom(100, 3, 95:100/100)
sph.binom(c(5, 10, 15, 20, 30, 50, 100, 200), 2, 0.98)

RSurveillance documentation built on May 29, 2017, 11:52 p.m.