BE3 {RBE3}R Documentation

The Generalized Beta Distribution

Description

Density, distribution function, quantile function and random generation for the generalized beta distribution.

Usage

dBE3(x, mu = 0.5, alpha = 1, beta = 1, tau = 0.5, log = FALSE)
pBE3(q, mu = 0.5, alpha = 1, beta = 1, tau = 0.5, lower.tail = TRUE, log.p = FALSE)
qBE3(p, mu = 0.5, alpha = 1, beta = 1, tau = 0.5)
rBE3(n, mu = 0.5, alpha = 1, beta = 1, tau = 0.5)

Arguments

x, q

vector of quantiles.

p

vector of probabilities.

n

number of observations.

mu

vector of τ\tau-quantiles of the distribution.

alpha, beta

shape parameters of the distribution

tau

corresponding quantile of the distribution (0<τ<10<\tau<1)

log, log.p

logical; if TRUE, probabilities pp are given as logp\log p.

lower.tail

logical; if TRUE (default), probabilities are P[Xx]P[X\leq x] otherwise, P[X>x]P[X>x].

Details

The probability density function for the generalized beta distribution is

f(y;λ,α,β)=λαyα1(1y)β1B(α,β)[1(1λ)y]α+β,0<y<1, f(y;\lambda,\alpha,\beta)=\frac{\lambda^\alpha y^{\alpha-1}(1-y)^{\beta-1}}{B(\alpha, \beta)[1-(1-\lambda)y]^{\alpha+\beta}}, \quad 0<y<1,

where α,β>0\alpha, \beta>0 and λ>0\lambda>0. We consider the reparameterization in terms of the τ\tau-quantile of the distribution, say 0<μ<10<\mu<1, taking

λ=(1μ)μzα,β(τ)[1zα,β(τ)], \lambda=\frac{(1-\mu)}{\mu}\frac{z_{\alpha,\beta}(\tau)}{[1-z_{\alpha,\beta}(\tau)]},

with zα,β(τ)z_{\alpha,\beta}(\tau) denoting the τ\tau-quantile of the usual beta distribution with shape parameters α\alpha and β\beta. The cumulative distribution function is given by

F(y;λ,α,β)=Iλx/(1+λxx)(α,β),0<y<1, F(y;\lambda,\alpha,\beta)=I_{\lambda x/(1+\lambda x -x)}(\alpha, \beta), \quad 0<y<1,

where Ix(α,β)=Bx(α,β)/B(α,β)I_x(\alpha,\beta)=B_x(\alpha,\beta)/B(\alpha,\beta) is the incomplete beta funcion ratio, Bx(α,β)=0xwα1(1w)β1dwB_x(\alpha,\beta)=\int_0^x w^{\alpha-1}(1-w)^{\beta-1}dw is the incomplete beta function and B(α,β)=Γ(α)Γ(β)/Γ(α+β)B(\alpha,\beta)=\Gamma(\alpha)\Gamma(\beta)/\Gamma(\alpha+\beta) is the ordinary beta function. The quantile of the distribution can be represented as

q(τ;λ,α,β)=zα,β(τ)λ[1zα,β(τ)]+zα,β(τ),0<τ<1. q(\tau;\lambda,\alpha,\beta)=\frac{z_{\alpha,\beta}(\tau)}{\lambda[1-z_{\alpha,\beta}(\tau)]+z_{\alpha,\beta}(\tau)}, \quad 0<\tau<1.

Random generation can be performed using the stochastic representation of the model. If X1\mboxGamma(α,θ1)X_1 \sim \mbox{Gamma}(\alpha,\theta_1) and X2\mboxGamma(β,θ2)X_2 \sim \mbox{Gamma}(\beta,\theta_2), then

X1X1+X2GB3(α,β,λ), \frac{X_1}{X_1+X_2}\sim GB3(\alpha,\beta,\lambda),

where λ=θ1/θ2.\lambda=\theta_1/\theta_2.

Value

dBE3 gives the density, pBE3 gives the distribution function, qBE3 gives the quantile function, and rBE3 generates random deviates.

The length of the result is determined by n for rBE3, and is the maximum of the lengths of the numerical arguments for the other functions.

The numerical arguments other than n are recycled to the length of the result. Only the first elements of the logical arguments are used.

Author(s)

Diego Gallardo and Marcelo Bourguignon

References

Libby, D. L. and Novick, M. R. (1982). Multivariate generalized beta-distributions with applications to utility assessment. Journal of Educational Statistics, 7.

Examples

rBE3(20, mu=0.5, alpha=2, beta=1)
dBE3(c(0.4,0.7), mu=0.5, alpha=2, beta=1)
pBE3(c(0.4,0.7), mu=0.5, alpha=2, beta=1)

[Package RBE3 version 1.1 Index]