gchisq {giniVarCI} | R Documentation |
Gini index for the Chi-Squared distribution with user-defined degrees of freedom
Description
Calculates Gini indices for the Chi-Squared distribution with degrees of freedom (
df
).
Usage
gchisq(df)
Arguments
df |
A vector of positive real numbers specifying degrees of freedom of the Chi-Squared distribution. |
Details
The Chi-Squared distribution with degrees of freedom (argument
df
) and denoted as , where
, has a probability density function given by (Kleiber and Kotz, 2003; Johnson et al., 1995)
and a cumulative distribution function given by
where , the gamma function is defined by
and the lower incomplete gamma function is given by
The Gini index can be computed as
The Chi-Squared distribution is related to the Gamma distribution: .
Value
A numeric vector with the Gini indices. A NA
is returned when degrees of freedom are non-numeric or non-positive.
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
Examples
# Gini index for the Chi-Squared distribution with degrees of freedom equal to 2.
gchisq(df = 2)
# Gini indices for the Chi-Squared distribution and different degrees of freedom.
gchisq(df = 5:10)