Gini coefficient of a distribution
Takes in a distribution and returns gini coefficient
gini(y)
y |
an integer or numeric distribution |
To compute the gini coefficient of a distribution, gini
is the right
function. It uses trapezoidal approximation to calculate the area of the curve.
Lorenz curve is also plotted as output.
gini coefficient of the distribution
Akash Jain
# Distribution dist <- c(1, 4, 7, 15, 10) # Gini coefficient GINI <- gini(y = dist)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.