The function computes the probability density function of the flexible beta distribution. It can also compute the probability density function of the augmented flexible beta distribution by assigning positive probabilities to zero and one and a (continuous) flexible beta density to the interval (0,1).
dFB(x, mu, phi, p, w, q0 = NULL, q1 = NULL)A vector with the same length as x.
a vector of quantiles.
the mean parameter of the flexible beta distribution. It must lie in (0, 1).
the precision parameter of the flexible beta distribution. It must be a positive real value.
the mixing weight. It must lie in (0, 1).
the normalized distance among clusters. It must lie in (0, 1).
the probability of augmentation in zero. It must lie in (0, 1). In case of no augmentation is NULL (default).
the probability of augmentation in one. It must lie in (0, 1). In case of no augmentation is NULL (default).
The FB distribution is a special mixture of two beta distributions with density $$f_{FB}(x;\mu,\phi,p,w)=p f_B(x;\lambda_1,\phi)+(1-p)f_B(x;\lambda_1,\phi)$$ for \(0<x<1\), where \(f_B(x;\cdot,\cdot)\) is the beta density with a mean-precision parameterization. Moreover, \(0<\mu=p\lambda_1+(1-p)\lambda_2<1\) is the overall mean,\(\phi>0\) is a precision parameter, \(0<p<1\) is the mixing weight, and \(0<w<1\) is the normalized distance between component means. The latter are \(\lambda_1=\mu+(1-p)\tilde{w}\) and \(\lambda_2=\mu-p\tilde{w}\), where \(\tilde{w}=w\min{\mu/p, (1-\mu)/(1-p)}\).
The augmented FB distribution has density
\(q_0\), if \(x=0\)
\(q_1\), if \(x=1\)
\((1-q_0-q_1)f_{FB}(x;\mu,\phi,p,w)\), if \(0<x<1 \)
where \(0<q_0<1\) identifies the augmentation in zero, \(0<q_1<1\) identifies the augmentation in one, and \(q_0+q_1<1\).
Di Brisco, A. M., Migliorati, S. (2020). A new mixed-effects mixture model for constrained longitudinal data. Statistics in Medicine, 39(2), 129--145. doi:10.1002/sim.8406
Migliorati, S., Di Brisco, A. M., Ongaro, A. (2018). A New Regression Model for Bounded Responses. Bayesian Analysis, 13(3), 845--872. doi:10.1214/17-BA1079
dFB(x = c(.5,.7,.8), mu = .3, phi = 20, p = .5, w = .5)
dFB(x = c(.5,.7,.8), mu = .3, phi = 20, p = .5, w = .5, q0 = .2)
dFB(x = c(.5,.7,.8), mu = .3, phi = 20, p = .5, w = .5, q0 = .2, q1 = .1)
Run the code above in your browser using DataLab