Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

gini

Gini coefficient of a distribution


Description

Takes in a distribution and returns gini coefficient

Usage

gini(y)

Arguments

y

an integer or numeric distribution

Details

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.

Value

gini coefficient of the distribution

Author(s)

Akash Jain

See Also

Examples

# Distribution
dist <- c(1, 4, 7, 15, 10)

# Gini coefficient
GINI <- gini(y = dist)

StatMeasures

Easy Data Manipulation, Data Quality and Statistical Checks

v1.0
GPL-2
Authors
Akash Jain
Initial release
2015-03-24

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.