Description Usage Arguments Details Author(s) See Also Examples
Computes the unweighted and weighted Gini index of a distribution.
1 2 3 4 |
x |
a data.frame, a matrix-like, or a vector. |
weights |
a vector containing weights for |
... |
additional arguements (currently ignored) |
One might say the Gini is oversensitive to changes in the middle, while undersensitive at the extremes. The G coefficient doesn't capture very explicitly changes in the top 10 inequality research in the past 10 years – or the bottom 40 most poverty lies. The alternative Palma ratio does.
Daniel Marcelino, dmarcelino@live.com.
GiniSimpson
, Lorenz
, Herfindahl
, Rosenbluth
, Atkinson
..
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | # generate a vector (of incomes)
x <- c(778, 815, 857, 888, 925, 930, 965, 990, 1012)
# compute Gini coefficient
Gini(x)
# For Gini index: Gini(x)*100
Gini(c(100,0,0,0), c(1,33,33,33))
# Considers this
A <- c(20000, 30000, 40000, 50000, 60000)
B <- c(9000, 40000, 48000, 48000, 55000)
Gini(A); Gini(B);
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.