gini.w | R Documentation |
Computes the Gini coefficient.
gini.w(x, weight)
x |
income vector of population |
weight |
vector of weights |
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).
GG |
the value of coefficient |
Alicja Wolny-Dominiak, Anna Saczewska-Piotrowska
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.
data(affluence)
gini.w(affluence$income, affluence$hs_size)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.