BlakerCI-internal {BlakerCI}R Documentation

Internal functions, not expected to be called by the user.

Description

For binomial distribution: Calculation of the lower Blaker's confidence limit as defined by Blaker (binom.blaker.lower.limit), or with so called Vos-Hudson adjustment (binom.blaker.VHadj.lower.limit); a single acceptability value, optionally “unimodalized” (binom.blaker.acc.single.p).

For Poisson distribution: Calculation of the lower and upper Blaker's confidence limits (poisson.blaker.lower.limit, poisson.blaker.upper.limit); a single acceptability value, optionally “unimodalized” (poisson.blaker.acc.single.p).

Usage

binom.blaker.lower.limit(x, n, level, tol = 1e-10, maxiter=100)
binom.blaker.VHadj.lower.limit(x,n,level,tol=1e-10,maxiter=100,
      nmax=n+1000,int.eps=1e-10)
binom.blaker.acc.single.p(x, n, p, type = "orig", acc.tol = 1e-10,
      output = "acc", maxiter=100)
poisson.blaker.lower.limit(x, level, tol = 1e-10, maxiter=100)
poisson.blaker.upper.limit(x, level, tol = 1e-10, maxiter=100)
poisson.blaker.acc.single.p(x, p, type = "orig", acc.tol = 1e-10,
      output = "acc", maxiter=100)

Arguments

x

number of successes (binomial case), or events (Poisson case).

n

number of trials.

level

confidence level.

tol

numerical tolerance (for the confidence limit).

p

point (binomial or Poisson parameter value) where to calculate the acceptability.

type

"orig", or "unimod" – either unmodified, or unimodalized acceptability
(see binom.blaker.acc, poisson.blaker.acc).

acc.tol

numerical tolerance (for the acceptability values when type = "unimod").

output

the acceptability value output (output = "acc", the default) or, instead, an auxiliary integer-valued parameter q1, used for testing whether points belong to the same continuous segment of the acceptability function (output = "q1"), or both (output = "both").

maxiter

Maximum number of interval halving iterations during the search for a confidence limit (binom.blaker.lower.limit, poisson.blaker.lower.limit, poisson.blaker.upper.limit), or a discontinuity point of the acceptability function (binom.blaker.acc.single.p, or poisson.blaker.acc.single.p with type = "unimod"). When the required accuracy is not reached in maxiter steps – typically when too small tol or acc.tol exceeds capabilities of machine arithmetic – last step's result is returned with warning.

nmax

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 suspect to have influence.

int.eps

Maximum expected error of machine representation of integers calculated via multiplication and division from reals. (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).)

Value

For binom.blaker.lower.limit and binom.blaker.VHadj.lower.limit, a single number – the lower confidence limit.
For binom.blaker.acc.single.p – depending on the output parameter – a single acceptability value, or a single auxiliary integer, or both.

Author(s)

Jan Klaschka klaschka@cs.cas.cz

See Also

binom.blaker.limits, binom.blaker.VHadj.limits,
binom.blaker.acc, binom.blaker.VHadj.acc, poisson.blaker.limits, poisson.blaker.acc.


[Package BlakerCI version 1.0-6 Index]