gini: Gini Coefficient G

Description Usage Arguments Details Author(s) See Also Examples

Description

Computes the unweighted and weighted Gini index of a distribution.

Usage

1
2
3
4
Gini(x, weights, ...)

## Default S3 method:
Gini(x, weights = rep(1, length = length(x)), ...)

Arguments

x

a data.frame, a matrix-like, or a vector.

weights

a vector containing weights for x.

...

additional arguements (currently ignored)

Details

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.

Author(s)

Daniel Marcelino, dmarcelino@live.com.

See Also

Simpson, Lorenz, Herfindahl, Rosenbluth, Atkinson..

Examples

 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);

danielmarcelino/SciencesPo documentation built on Oct. 20, 2019, 1:15 a.m.