Learn R Programming

BayesianHybridDesign (version 0.1.0)

exactci: Clopper-Pearson Exact Confidence Interval for a Binomial Proportion

Description

Calculates the two-sided Clopper-Pearson exact confidence interval for a binomial proportion.

Usage

exactci(r, n, conflev)

Value

A numeric vector of length two containing the lower and upper confidence limits.

Arguments

r

A scalar integer. The number of successes or responses.

n

A scalar integer. The total number of trials or subjects.

conflev

A scalar numeric. The desired confidence level (e.g., 0.95 for a 95% CI).

Examples

Run this code
exactci(r=4, n=20, conflev=0.95)

Run the code above in your browser using DataLab