# binomTestEnsemble: Ensemble Confidence Intervals for Binomial Proportions In conf: Visualization and Analysis of Statistical Measures of Confidence

 binomTestEnsemble R Documentation

## Ensemble Confidence Intervals for Binomial Proportions

### Description

Generates lower and upper confidence interval limits for a binomial proportion using an ensemble of confidence intervals.

### Usage

``````  binomTestEnsemble(n, x,
alpha = 0.05,
CP = TRUE,
WS = TRUE,
JF = TRUE,
AC = TRUE,
AR = TRUE)
``````

### Arguments

 `n` sample size `x` number of successes `alpha` significance level for confidence interval `CP` logical; if `TRUE` (default), include Clopper-Pearson confidence interval procedure in the ensemble `WS` logical; if `TRUE` (default), include Wilson-Score confidence interval procedure in the ensemble `JF` logical; if `TRUE` (default), include Jeffreys confidence interval procedure in the ensemble `AC` logical; if `TRUE` (default), include Agresti-Coull confidence interval procedure in the ensemble `AR` logical; if `TRUE` (default), include Arcsine confidence interval procedure in the ensemble

### Details

Generates lower and upper confidence interval limits for a binomial proportions using

• various sample sizes,

• various numbers of successes, and

• various combinations of confidence intervals.

When the `binomTestEnsemble` function is called, it returns a two-element vector in which

• the first element is the lower bound of the Ensemble confidence interval, and

• the second element is the upper bound of the Ensemble confidence interval.

To construct an Ensemble confidence interval that attains an actual coverage that is close to the stated coverage, the five constituent confidence interval procedures can be combined. Since these intervals vary in width, the lower limits and the actual coverage of the constituent confidence intervals at the maximum likelihood estimator are calculated. Likewise, the upper limits and the actual coverage of the constituent confidence intervals at the maximum likelihood estimator are calculated. The centroids of the lower and upper constituent confidence intervals for points falling below and above the stated coverage are connected with a line segment. The point of intersection of these line segments and the stated coverage gives the lower and upper bound of the Ensemble confidence interval. Special cases to this approach are given in the case of (a) the actual coverages all fall above or below the stated coverage, and (b) the slope of the line connecting the centroids is infinite.

If only one of the logical arguments is `TRUE`, the code returns a simple confidence interval of that one procedure.

The Wald confidence interval is omitted because it degenerates in actual coverage for `x = 0` and `x = n`.

### Author(s)

Hayeon Park (hpark031@gmail.com), Larry Leemis (leemis@math.wm.edu)

### References

Park, H., Leemis, L. (2019), "Ensemble Confidence Intervals for Binomial Proportions", Statistics in Medicine, 38 (18), 3460-3475.

### Examples

``````  binomTestEnsemble(10, 3)
binomTestEnsemble(100, 82, CP = FALSE, AR = FALSE)
binomTestEnsemble(33, 1, CP = FALSE, JF = FALSE, AC = FALSE, AR = FALSE)
``````

conf documentation built on Oct. 1, 2023, 1:07 a.m.