n.binom: Binomial sample size

Description Usage Arguments Value Examples

View source: R/freedom_functions_1.R

Description

Calculates sample size for demonstrating freedom or detecting disease using binomial approach and assuming imperfect test sensitivity, perfect test specificity and representative sampling

Usage

1
n.binom(sep, pstar, se = 1)

Arguments

sep

desired population sensitivity (scalar or vector)

pstar

specified design prevalence (scalar or vector of same length as sep)

se

unit sensitivity, default = 1 (scalar or vector of same length as sep)

Value

vector of sample sizes

Examples

1
2
3
# examples for n.binom - checked
n.binom(sep=0.95, pstar=c(0.01, 0.02, 0.05, 0.1, 0.2))
n.binom(c(0.5, 0.8, 0.9, 0.95), 0.01)

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