binom.optim(n, conf.level = 0.95, method = binom.lrt,
k = n%/%2 + 1, p0 = 0, transform = TRUE,
plot = FALSE, tol = .Machine$double.eps^0.5,
start = NULL, ...)TRUE the optimizer will do an
unconstrained optimization on the signficance probability in the
logit space.TRUE the results are sent to binom.plot.optim.list with the following elements:
k.}optim.optim.optim.data.frame returned from a call to
method using the optimized confidence levels.$$\alpha_{opt}=\arg\min_{\alpha}\int_{0}^{1}[C(p,n)-(1-\alpha)^2dp$$
The optimizer will adjust confidence intervals for all x =
0 to n depending on the value of k provided. If
k is one, only the confidence levels for x = 0 and
n are adjusted. If k = [n/2] then all confidence
intervals are adjusted. This assumes the confidence intervals are the
same length for x = x[k] and x[n - k + 1], which is
the case for all methods provided in this package except
binom.cloglog.
binom.confint, binom.plot,
binom.coverage, optimbinom.optim(10, k = 1) ## determine optimal significance for x = 0, 10 only
binom.optim(3, method = binom.wilson) ## determine optimal significance for all xRun the code above in your browser using DataLab