The function generates random values from the beta distribution with a mean-precision parameterization, or from the augmented beta distribution.
rBeta(n, mu, phi, q0 =NULL, q1 =NULL)
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.
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).
Returns
A vector of length n.
Examples
rBeta(n =100, mu =.5, phi =30)rBeta(n =100, mu =.5, phi =30, q0 =.2, q1 =.1)
References
Ferrari, S.L.P., Cribari-Neto, F. (2004). Beta Regression for Modeling Rates and Proportions. Journal of Applied Statistics, 31 (7), 799--815. doi:10.1080/0266476042000214501