ci.one.prop: Confidence interval for a single proportion

Description Usage Arguments Value Author(s) References Examples

View source: R/ci_one_prop.R

Description

This function returns the confidence interval for a single proportion using »Wilson's score« (1927) as recommended in Newcombe (Method 3, 1998).

Usage

1
ci.one.prop(ci, r, n)

Arguments

ci

The confidence level - pass as a natural number (e.g. 95 for the 95% confidence interval)

r

Frequency of events

n

Total trial frequency

Value

A list containing the confidence interval boudaries.

p

The proportion r/n

l

The lower bound of the confidence interval of p=r/n

u

The upper bound of the confidence interval of p=r/n

Author(s)

Martin Papenberg martin.papenberg@hhu.de

References

Newcombe, R. G. (1998). Two‐sided confidence intervals for the single proportion: comparison of seven methods. Statistics in medicine, 17(8), 857-872.

Wilson, E. B. (1927). Probable inference, the law of succession, and statistical inference. Journal of the American Statistical Association, 22(158), 209-212.

Examples

1
2
3
# Examples from Newcombe (1998):
ci.one.prop(ci=95, r=81, n=263)
ci.one.prop(ci=95, r=15, n=148)

m-Py/propint documentation built on July 26, 2019, 8:47 a.m.