Learn R Programming

RSurveillance (version 0.2.1)

n.binom: Binomial sample size

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

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

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

Run the code above in your browser using DataLab