Density and random generation for the Beta-binomial distribution with parameters size
, mu
, and theta
.
rbetabinom(n = 1, size, prob, theta)dbetabinom(x, size, prob, theta, log = FALSE)
integer; number of random variates to generate.
size
parameter of the binomial distribution
mean of the Beta distribution
Beta distribution dispersion parameter
vector of non-negative integer quantiles
logical; if TRUE, return logarithm(s) of probabilities.
Returns a vector of length n
containing random variates drawn from the Beta-binomial distribution.
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
).
An interface for C codes using these functions is provided by the package. Visit the package homepage to view the pomp C API document.
A variable \(X\) is Beta-binomially distributed if \(X~Binomial(n,P)\) where \(P~Beta(mu,theta)\). Using the standard (a,b) parameterization, \(a=mu*theta\) and \(b=(1-mu)*theta\).
More on implementing POMP models:
Csnippet
,
accumulator variables
,
basic components
,
covariates
,
distributions
,
dmeasure specification
,
dprocess specification
,
emeasure specification
,
parameter transformations
,
pomp-package
,
pomp
,
prior specification
,
rinit specification
,
rmeasure specification
,
rprocess specification
,
skeleton specification
,
transformations
,
userdata
,
vmeasure specification