dFBB: Flexible beta-binomial probability mass function

View source: R/densities.R

dFBBR Documentation

Flexible beta-binomial probability mass function

Description

The function computes the probability mass function of the flexible beta-binomial distribution.

Usage

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 paramete. It must lie in (0, 1).

phi

the precision parameter. It is an alternative way to specify the theta parameter. It must be a positive real value.

p

the mixing weight. It must lie in (0, 1).

w

the normalized distance among clusters. It must lie in (0, 1).

Details

The FBB distribution is a special mixture of two beta-binomial distributions

p BB(x;λ_1,φ)+(1-p)BB(x;λ_2,φ)

for x \in \lbrace 0, 1, …, n \rbrace where BB(x;\cdot,\cdot) is the beta-binomial distribution with a mean-precision parameterization. Moreover, φ=(1-θ)/θ, 0<p<1 is the mixing weight, φ>0 is a precision parameter, λ_1=μ+(1-p)w and λ_2=μ-pw are the component means of the first and second component of the mixture, 0<μ=pλ_1+(1-p)λ_2<1 is the overall mean, and 0<w<1 is the normalized distance between clusters.

Value

A vector with the same length as x.

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

Examples

dFBB(x = c(5,7,8), size=10, mu = .3, phi = 20, p = .5, w = .5)


FlexReg documentation built on Sept. 16, 2022, 5:06 p.m.