gini.Rd
Calculate the Gini index of a numeric vector.
gini(x)
x | A numeric vector. |
---|
A numeric value between 0 and 1.
The Gini index (Gini coefficient) is a measure of statistical dispersion. A Gini coefficient of zero expresses perfect equality where all values are the same. A Gini coefficient of one expresses maximal inequality among values.
Gini. C. (1912) Variability and Mutability, C. Cuppini, Bologna 156 pages.
Jitao David Zhang <jitao_david.zhang@roche.com>
testValues <- runif(100)
gini(testValues)
#> [1] 0.32505