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 |
Details
The Gamma distribution with shape
parameter \alpha
, scale parameter \sigma
and denoted as Gamma(\alpha, \sigma)
, where \alpha>0
and \sigma>0
, has a probability density function given by (Kleiber and Kotz, 2003; Johnson et al., 1995)
f(y) = \displaystyle \frac{1}{\sigma^{\alpha}\Gamma(\alpha)}y^{\alpha-1}e^{-y/\sigma},
and a cumulative distribution function given by
F(y) = \frac{\gamma\left(\alpha, \frac{y}{\sigma}\right)}{\Gamma(\alpha)},
where y \geq 0
, the gamma function is defined by
\Gamma(\alpha) = \int_{0}^{\infty}t^{\alpha-1}e^{-t}dt,
and the lower incomplete gamma function is given by
\gamma(\alpha,y) = \int_{0}^{y}t^{\alpha-1}e^{-t}dt.
The Gini index can be computed as
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) = \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)