Probability mass function of the flexible beta-binomial distribution
Probability mass function of the flexible beta-binomial distribution
The function computes the probability mass function of the flexible beta-binomial distribution.
dFBB(x, size, mu, theta =NULL, phi =NULL, p, w)
Arguments
x: a vector of quantiles.
size: the total number of trials.
mu: the mean parameter. It must lie in (0, 1).
theta: the overdispersion parameter. It must lie in (0, 1).
phi: the precision parameter, an alternative way to specify the overdispersion parameter theta. It must be a real positive value.
p: the mixing weight. It must lie in (0, 1).
w: the normalized distance among component means. It must lie in (0, 1).
Returns
A vector with the same length as x.
Details
The FBB distribution is a special mixture of two beta-binomial distributions with probability mass function
fFBB(x;μ,ϕ,p,w)=pBB(x;λ1,ϕ)+(1−p)BB(x;λ2,ϕ),
for x∈{0,1,…,n}, where BB(x;⋅,⋅) is the beta-binomial distribution with a mean-precision parameterization. Moreover, ϕ=(1−θ)/θ>0 is a precision parameter, 0<p<1 is the mixing weight, 0<μ=pλ1+(1−p)λ2<1 is the overall mean, 0<w<1 is the normalized distance between component means, and λ1=μ+(1−p)w and λ2=μ−pw are the scaled means of the first and second component of the mixture, respectively.
Examples
dFBB(x = c(5,7,8), size=10, mu =.3, phi =20, p =.5, w =.5)
References
Ascari, R., Migliorati, S. (2021). A new regression model for overdispersed binomial data accounting for outliers and an excess of zeros. Statistics in Medicine, 40 (17), 3895--3914. doi:10.1002/sim.9005