Learn R Programming

affluenceIndex (version 2.2)

gini.w: Gini coefficient

Description

Computes the Gini coefficient.

Usage

gini.w(x, weight)

Value

GG

the value of coefficient

Arguments

x

income vector of population

weight

vector of weights

Author

Alicja Wolny-Dominiak, Anna Saczewska-Piotrowska

Details

The Gini coefficient is the most popular measure of income inequality. The formula taking into account the weights of income \(w_1,w_2,...,w_n\) is given by: $$G_w = \frac{\sum_{i=1}^nw_i\sum_{j=1}^n w_j|x_i-x_j|}{2(\sum_{i=1}^nw_i)^2\mu_w},$$ where \(x_i,x_j\) are incomes of individuals \(i\) and \(j\), respectively, \(n\) is the number of individuals, \(\mu_w\) is the mean income. The Gini coefficient ranges between 1 (perfect equality) and 1 (perfect inequality).

References

1. Creedy J. (2015). A note on computing the Gini inequality measure with weighted data. Workin Paper No. 3, Victoria University of Wellington.
2. Lerman R.I., Yitzhaki S. (1989) Improving the accuracy of estimates of Gini coefficients. Journal of Econometrics, 42(1), pp. 43-47.

Examples

Run this code
data(affluence)
gini.w(affluence$income, affluence$hs_size)

Run the code above in your browser using DataLab