ci_p_rindskopf: Rindskopf confidence interval for Binomial proportion

View source: R/ci_p_xxx.R

ci_p_rindskopfR Documentation

Rindskopf confidence interval for Binomial proportion

Description

This function calculates the confidence interval for a proportion. It is vectorized, allowing users to evaluate it using either single values or vectors.

Usage

ci_p_rindskopf(x, n, conf.level = 0.95)

Arguments

x

A number or a vector with the number of successes.

n

A number or a vector with the number of trials.

conf.level

Confidence level for the returned confidence interval. By default, it is 0.95.

Details

The expression to calculate the confidence interval according to the Rindskopf approach is given by:

\phi=\text{logit}(\pi)=\log\left(\frac{\pi}{1 - \pi}\right),

where the maximum likelihood estimator for \phi is:

\hat{\phi}_{ML}=\log\left(\frac{x + 0.5}{n - x + 0.5}\right),

and its standard error is:

\text{se}(\hat{\phi}_{ML})=\sqrt{\frac{1}{x + 0.5} + \frac{1}{n - x + 0.5}}.

The adjustment of adding 0.5 successes and non-successes ensures that intervals can also be computed for the cases where x=0 or x=n (where otherwise the maximum likelihood estimator and standard error would be infinite).

Since the scale of \phi is (- \infty, \infty), this interval respects the boundary constraints. Back-transformation to the scale of \pi is performed using the inverse logit function:

\pi=\text{expit}(\phi)=\frac{\exp(\phi)}{1 + \exp(\phi)}.

Thus, the confidence interval for \pi in the original scale is the Rindskopf confidence interval, as proposed by Rindskopf.

Value

A vector with the lower and upper limits.

Author(s)

David Esteban Cartagena Mejía, dcartagena@unal.edu.co

References

Rindskopf, D. (2000). Commentary: Approximate is better than “exact” for interval estimation of binomial proportions. The American Statistician, 54, 88.

See Also

ci_p.

Examples

ci_p_rindskopf(x=15, n=50, conf.level=0.95)


fhernanb/stests documentation built on March 29, 2025, 10:36 a.m.