rBeta_mu: Random generator from the beta distribution

View source: R/rgen.R

rBeta_muR Documentation

Random generator from the beta distribution

Description

The function generates random values from the beta distribution with a mean-precision parameterization, or from the augmented beta distribution.

Usage

rBeta_mu(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 of the beta distribution. It must lie in (0, 1).

phi

the precision parameter of the Beta distribution. It must be a positive real value.

q0

the probability of augmentation in zero. It must lie in (0, 1). In case of no augmentation is NULL (default).

q1

the probability of augmentation in one. It must lie in (0, 1). In case of no augmentation is NULL (default).

Value

A vector of length n.

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

Examples

rBeta_mu(n = 100, mu = .5, phi = 30)
rBeta_mu(n = 100, mu = .5, phi = 30, q0 = .2, q1 = .1)


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