dBeta | R Documentation |
Density function, distribution function, quantile function, and random generation for the (augmented) beta distribution with the mean-precision parameterization.
dBeta(x, mu, phi, q0 = NULL, q1 = NULL, log = FALSE)
qBeta(prob, mu, phi, q0 = NULL, q1 = NULL, log.prob = FALSE)
pBeta(q, mu, phi, q0 = NULL, q1 = NULL, log.prob = FALSE)
rBeta(n, mu, phi, q0 = NULL, q1 = NULL)
x , q |
a vector of quantiles. |
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 |
q1 |
the probability of augmentation in one. It must lie in (0, 1). In case of no augmentation, it is |
log |
logical; if TRUE, densities are returned on log-scale. |
prob |
a vector of probabilities. |
log.prob |
logical; if TRUE, probabilities |
n |
the number of values to generate. If |
The beta distribution has density
f_B(x;\mu,\phi)=\frac{\Gamma{(\phi)}}{\Gamma{(\mu\phi)}\Gamma{((1-\mu)\phi)}}x^{\mu\phi-1}(1-x)^{(1-\mu)\phi-1}
for 0<x<1
, where 0<\mu<1
identifies the mean and \phi>0
is the precision parameter.
The augmented beta distribution has density
q_0
, if x=0
q_1
, if x=1
(1-q_0-q_1)f_B(x;\mu,\phi)
, 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
.
The function dBeta
returns a vector with the same length as x
containing the density values.
The function pBeta
returns a vector with the same length as q
containing the values of the distribution function.
The function qBeta
returns a vector with the same length as prob
containing the quantiles.
The function rBeta
returns a vector of length n
containing the generated random values.
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
dBeta(x = c(.5,.7,.8), mu = .3, phi = 20)
dBeta(x = c(.5,.7,.8), mu = .3, phi = 20, q0 = .2)
dBeta(x = c(.5,.7,.8), mu = .3, phi = 20, q0 = .2, q1= .1)
qBeta(prob = c(.5,.7,.8), mu = .3, phi = 20)
qBeta(prob = c(.5,.7,.8), mu = .3, phi = 20, q0 = .2)
qBeta(prob = c(.5,.7,.8), mu = .3, phi = 20, q0 = .2, q1= .1)
pBeta(q = c(.5,.7,.8), mu = .3, phi = 20)
pBeta(q = c(.5,.7,.8), mu = .3, phi = 20, q0 = .2)
pBeta(q = c(.5,.7,.8), mu = .3, phi = 20, q0 = .2, q1= .1)
rBeta(n = 100, mu = .5, phi = 30)
rBeta(n = 100, mu = .5, phi = 30, q0 = .2, q1 = .1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.