gini: Calculates a Gini Index

giniR Documentation

Calculates a Gini Index

Description

The function gini() calculates the Gini Index associated to the variable var.

Usage

gini(var)

Arguments

var

a vector of numerical values of size n

Details

Let x_k, k=1,...,K be the distinct values taken by var. For each site, Gini.r returns two pairs of frequencies. The pair (f,g) where f represents

f_k=\frac{1}{n}\sum_i 1(Var_i=x_k)

(n is the length of var) and g represents

g_k=\frac{x_k}{\bar{x}}f_k

The pair (F,G) represents the corresponding cumulative frequencies.
The Gini Index is calculated as :

I_G=\frac{1}{2\bar{x}}\sum_{i=1}^K\sum_{j=1}^K|x_i-x_j|

Value

(f, F, g, G, gini) where f, F, g and G are vectors of size K and gini a numeric value.

Note

This function is used in ginimap.R but it is not an interactive function.

Author(s)

Thomas-Agnan C., Aragon Y., Ruiz-Gazen A., Laurent T., Robidou L.

References

Thibault Laurent, Anne Ruiz-Gazen, Christine Thomas-Agnan (2012), GeoXp: An R Package for Exploratory Spatial Data Analysis. Journal of Statistical Software, 47(2), 1-23.

See Also

ginimap


tibo31/GeoXp documentation built on April 8, 2023, 7:50 a.m.