Learn R Programming

npsm (version 2.0.0)

wilson.ci: Wilson (score) confidence interval for a population proportion.

Description

Wilson (score) confidence interval for a population proportion.

Usage

wilson.ci(x, n, conf.level = 0.95)

Value

conf.int

estimated confidence interval

Arguments

x

number of events

n

number of samples

conf.level

confidence level

Author

John Kloke, Joseph McKean

Details

Uses defintion in Agresti.

References

Agresti (2002), Categorical data analysis, New York: John Wiley & Sons, Inc.

See Also

Examples

Run this code
n <- 100
x <- rbinom(1,n,0.33)
wilson.ci(n,x)

Run the code above in your browser using DataLab