rFB: Random generator from the flexible beta distribution
Description
The function generates random values from the flexible beta distribution, or from the augmented flexible beta distribution.
Usage
rFB(n, mu, phi, p, w, q0 = NULL, q1 = NULL)
Value
A vector of length n.
Arguments
n
the number of values to generate. If length(n) > 1, the length is taken to be the number required.
mu
the mean parameter. It must lie in (0, 1).
phi
the precision parameter. It must be a real positive value.
p
the mixing weight. It must lie in (0, 1).
w
the normalized distance among clusters. It must lie in (0, 1).
q0
the probability of augmentation in zero. It must lie in (0, 1). In case of no augmentation, it is NULL (default).
q1
the probability of augmentation in one. It must lie in (0, 1). In case of no augmentation, it is NULL (default).
References
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