Learn R Programming

BlakerCI (version 1.0-5)

binom.blaker.VHadj.limits: Vos-Hudson adjustment of Blaker's binomial confidence limits

Description

Blaker's binomial confidence limits adjusted so that logical inconsistencies criticized by Vos and Hudson (2008) are avoided.

Usage

binom.blaker.VHadj.limits(x, n, level = 0.95, tol = 1e-10, ...)

Arguments

x

number of successes.

n

number of trials.

level

confidence level.

tol

numerical tolerance.

...

additional arguments to be passed to binom.blaker.VHadj.lower.limit: maxiter, nmax, int.eps (see BlakerCI-internal).

Value

Length 2 vector -- the lower and upper (adjusted) confidence limits.

Warning

The stopping rule used is not fully justified:

The Clopper-Pearson 1 - alpha confidence bounds for x successes in n trials may be expressed as qbeta(alpha/2,x,n-x+1) and qbeta(1-alpha/2,x+1,n-x), and can be generalized this way to real (i. e. not only integer) values of x.

The stopping rule used in binom.blaker.VHadj.limits relies on the hypothesis that the generalized lower (upper) Clopper-Pearson confidence bounds grow (decrease) whenever the number of trials grows, and the proportion of successes grows (decreases) or remains unchanged (with obvious exceptions in extremes).

Though I firmly trust the hypothesis, I can prove it, so far, just for integer numbers of successes (i. e. for “ordinary” Clopper-Pearson confidence bounds, not the generalized ones), and lack a general proof. Should the hypothesis be invalid, the stopping rule implemented in binom.blaker.VHadj.limits would be incorrect, and the process of modifying the Blaker's confidence bounds could be incomplete in some cases.

References

Vos, P. W. & Hudson, S. (2008). Problems with binomial two-sided tests and the associated confidence intervals. Australian & New Zealand Journal of Statistics 50(1): 81-89.

Lecoutre, B. & Poitevineau, J. (2014). New results for computing Blaker's exact confidence interval limits for usual one-parameter discrete distributions. Communications in Statistics - Simulation and Computation, http://dx.doi.org/10.1080/03610918.2014.911900.

Examples

Run this code
# NOT RUN {
binom.blaker.VHadj.limits(6,13) # [1] 0.2150187 0.7395922

## Note that the lower limit differs from the 
## unadjusted version:

binom.blaker.limits(6,13)       # [1] 0.2158050 0.7395922

## The (unadjusted) lower limit was replaced with the
## Blaker's lower limit (both unadjusted and adjusted) 
## assigned to 7 successes in 15 trials:

binom.blaker.limits(7,15)       # [1] 0.2150187 0.7096627
binom.blaker.VHadj.limits(7,15) # [1] 0.2150187 0.7096627

## The adjustment avoids a contradiction between
## inferences corresponding to
## 6 successes in 13 trials, and 7 successess in 15 trials: 
## Though the latter situation means a higher succes proportion
## in a higher number of trials, it is assigned a smaller
## (unadjusted) Blaker's 95% lower confidence limit. 
# }

Run the code above in your browser using DataLab