ggamma {giniVarCI}R Documentation

Gini index for the Gamma distribution with user-defined shape parameter

Description

Calculates the Gini indices for the Gamma distribution with shape parameters α\alpha.

Usage

ggamma(shape)

Arguments

shape

A vector of positive real numbers specifying the shape parameters α\alpha of the Gamma distribution.

Details

The Gamma distribution with shape parameter α\alpha, scale parameter σ\sigma and denoted as Gamma(α,σ)Gamma(\alpha, \sigma), where α>0\alpha>0 and σ>0\sigma>0, has a probability density function given by (Kleiber and Kotz, 2003; Johnson et al., 1995)

f(y)=1σαΓ(α)yα1ey/σ,f(y) = \displaystyle \frac{1}{\sigma^{\alpha}\Gamma(\alpha)}y^{\alpha-1}e^{-y/\sigma},

and a cumulative distribution function given by

F(y)=γ(α,yσ)Γ(α),F(y) = \frac{\gamma\left(\alpha, \frac{y}{\sigma}\right)}{\Gamma(\alpha)},

where y0y \geq 0, the gamma function is defined by

Γ(α)=0tα1etdt,\Gamma(\alpha) = \int_{0}^{\infty}t^{\alpha-1}e^{-t}dt,

and the lower incomplete gamma function is given by

γ(α,y)=0ytα1etdt.\gamma(\alpha,y) = \int_{0}^{y}t^{\alpha-1}e^{-t}dt.

The Gini index can be computed as

G=Γ(2α+12)αΓ(α)π.G = \displaystyle \frac{\Gamma\left(\frac{2\alpha+1}{2}\right)}{\alpha\Gamma(\alpha)\sqrt{\pi}}.

The Gamma distribution is related to the Chi-squared distribution: Gamma(n/2,2)=χn2Gamma(n/2, 2) = \chi_{n}^2.

Value

A numeric vector with the Gini indices. A NA is returned when a shape parameter is non-numeric or non-positive.

Note

The Gini index of the Gamma distribution does not depend on its scale parameter.

Author(s)

Juan F Munoz jfmunoz@ugr.es

Jose M Pavia pavia@uv.es

Encarnacion Alvarez encarniav@ugr.es

References

Kleiber, C. and Kotz, S. (2003). Statistical Size Distributions in Economics and Actuarial Sciences, Hoboken, NJ, USA: Wiley-Interscience.

Johnson, N. L., Kotz, S. and Balakrishnan, N. (1995) Continuous Univariate Distributions, volume 1, chapter 14. Wiley, New York.

See Also

gchisq, gf, gbeta, gweibull, glnorm

Examples

# Gini index for the Gamma distribution with 'shape = 1'.
ggamma(shape = 1)

# Gini indices for the Gamma distribution and different shape parameters.
ggamma(shape = 1:10)

[Package giniVarCI version 0.0.1-3 Index]