binom.blaker.VHadj.acc {BlakerCI}R Documentation

Blaker's binomial acceptability function with Vos-Hudson adjustment.


Calculates values of the Vos-Hudson adjusted acceptability function in a sequence of points (for, e.g., plotting purposes). The adjusted acceptability function may optionally be “unimodalized”, i.e. replaced with the smallest greater or equal unimodal function.


binom.blaker.VHadj.acc(x, n, p, type = c("orig", "unimod"),
      acc.tol = 1e-10, nmax=n+1000,int.eps=1e-12, ...)



number of successes.


number of trials.


vector (length 1 allowed) of hypothesized binomial parameters (between 0 and 1). In case of more than one point, an increasing sequence required.


for type = "orig", Vos-Hudson adjustment applied to original acceptability function. For type = "unimod", smallest unimodal function greater or equal to the adjusted acceptability function.


numerical tolerance (relevant only for type = "unimod").


Pairs (y, m) of number of trials and number of successes are allowed to contribute to the Vos-Hudson adjustment for only m up to nmax. Warning is returned when greater numbers of trials are suspected to have influence.


Maximum expected error of machine representation of integers calculated from reals via multiplication and division. (Used in order to round numbers correctly if they happen to be integer, e. g. ceiling(xx - int.eps) is calculated instead of ceiling(xx).)


additional arguments to be passed to binom.blaker.acc.single.p; in fact, just maxiter (see BlakerCI-internal).


The relationship between the adjusted acceptability function and the adjusted confidence intervals (see binom.blaker.VHadj.limits) is the same as between the unadjusted acceptability function and confidence interval (see binom.blaker.acc, binom.blaker.limits): The confidence interval is the convex hull of the set of those points where the function exceeds 1 - confidence level.


Vector of Vos-Hudson adjusted acceptability values (with or without unimodalization) in points of p.


(1) Comparing output of the function with that of binom.blaker.acc cannot answer positively the question whether the unadjusted and adjusted functions are identical on an interval (but, up to the numerical accuracy, in the points of p only).

(2) The Warning section of the binom.blaker.VHadj.limits documentation is relevant here, as well.


Jan Klaschka


p <- seq(0,1,length=10001)
acc.adj <- binom.blaker.VHadj.acc(6,13,p)
acc <- binom.blaker.acc(6,13,p)

  ,main=paste("Vos-Hudson adjustment of acceptability function"
  ,"for 6 successes in 13 trials"
  , sep="\n")

## Plot of differences between the unadjusted and adjusted
## acceptability functions reveals some adjustment details
## hardly visible in the previous graph. 

plot(p,acc.adj-acc,type="l",ylab="acceptability difference")

## The narrow peak near 0.215 is close to the 
## Blaker's lower 0.95 confidence limit.
## Focussing on the neighbourhood of 0.215:

p <- seq(0.21,0.22,length=1001)
acc.adj <- binom.blaker.VHadj.acc(6,13,p)
acc <- binom.blaker.acc(6,13,p)

  ,main=paste("A detail of Vos-Hudson adjustment of acceptability function"
  ,"for 6 successes in 13 trials"

## The above adjustment results from the fact that, though
## 15 > 13 and 7/15 > 6/13, the acceptability function
## for 7 successes in 15 trials is greater that that for 6 successes
## in 13 trials on a short interval:

acc.7.15 <- binom.blaker.acc(7,15,p)
  ,main=paste("A detail of acceptability functions"
legend(x=.210,y=.08,c("6 / 13","7 / 15"),col=c("black","green")
  ,title="succ / trials",lwd=1)

## The adjustment shifts the point where the 0.05 level is exceeded,
## i. e. the Blaker's lower 0.95 confidence limit, from 0.2158 to 0.2150. 
## (Compare with Examples in binom.blaker.VHadj.limits section.)

[Package BlakerCI version 1.0-6 Index]