n: integer; number of random variates to generate.
size: size parameter of the binomial distribution
prob: mean of the Beta distribution
theta: Beta distribution dispersion parameter
x: vector of non-negative integer quantiles
log: logical; if TRUE, return logarithm(s) of probabilities.
Returns
rbetabinom: Returns a vector of length n containing random variates drawn from the Beta-binomial distribution.
dbetabinom: Returns a vector (of length equal to the number of columns of x) containing the probabilities of observing each column of x given the specified parameters (size, prob, theta).
Details
A variable X is Beta-binomially distributed if XBinomial(n,P) where PBeta(mu,theta). Using the standard (a,b) parameterization, a=mu∗theta and b=(1−mu)∗theta.
C API
An interface for C codes using these functions is provided by the package. Visit the package homepage to view the c("list("pomp")", " C API document").