Learn R Programming

RSurveillance (version 0.2.1)

binom.cp: Clopper-Pearson exact confidence limits

Description

Calculates Clopper-Pearson exact binomial confidence limits for a simple proportion (apparent prevalence)

Usage

binom.cp(x, n, conf = 0.95)

Arguments

x

number of positives in sample

n

sample size, note: either x or n can be a vector, but at least one must be scalar

conf

level of confidence required, default = 0.95 (scalar)

Value

a dataframe with 6 columns, x, n, proportion, lower confidence limit, upper confidence limit, confidence level and CI method

Examples

Run this code
# NOT RUN {
# test binom.cp
binom.cp(25, 200)
binom.cp(seq(10, 100, 10), 200)
binom.cp(50, seq(100, 1000, 100))
# }

Run the code above in your browser using DataLab