dpqrBetaBinom.RdDensity, distribution function, quantile function and random generation for the beta-binomial distribution with parameters pi and theta.
These can be interpreted as an expected probability of success and a dispersion parameter respectively,
and can respectively be expressed in terms of the common alpha, beta parameterization as pi = alpha/(alpha+beta) and theta = 1/(alpha+beta).
dBetaBinom(ms, ns, pi, theta, LOG = FALSE, MemLim = 2048L, Xtra = 7L)
pBetaBinom(ms, ns, pi, theta, lower.tail = TRUE, log.p = FALSE)
qBetaBinom(p, ns, pi, theta, lower.tail = TRUE, log.p = FALSE)
rBetaBinom(ns, pi, theta)Numeric vector. Vector of number of successes
Numeric vector. Vector of number of trials
Number. Probability of success; 0 >= pi >= 1
Number. Dispersion parameter; 0 >= theta > +Inf
Logical. If TRUE, dBetaBinom returns log-densities.
Integer. The memory limit, in bits, of numbers used during the calculation of the density.
For extreme data/parameter values, it may be necesssary to go beyond R's double memory, i.e. 53 bits,
in order to get correct results. However, this argument prevents boundless memory usage.
In case this limit is reached, dBetaBinom falls back on the regular dbinom function,
as this should only happen for extremely close-to-zero theta-values anyway.
A warning message is generated if this occurs.
Integer. An internal control parameter, determines the number of decimal places that are to be stored correctly in memory during calculation of beta-binomial densities, upon which the number of bits to be used per number depends. It's not recommended to change this from the default.
Logical. If TRUE, probabilities p returned and accepted by pBetaBinom and qBetaBinom respectively are given as log(p).
dBetaBinom gives the density, pBetaBinom gives the distribution function, qBetaBinom gives the quantile function and rBetaBinom generates random deviates. Where applicable, output has the same length as ms and/or ns.