gini.wtd {dineq}R Documentation

Gini coefficient

Description

Returns the (optional weighted) Gini coefficient for a vector.

Usage

gini.wtd(x, weights = NULL)

Arguments

x

a numeric vector containing at least non-negative elements.

weights

an optional vector of weights of x to be used in the computation of the Gini coefficient. Should be NULL or a numeric vector.

Details

The Gini coefficient is a measure of inequality among values of a distribution. The most used single measure for income inequality. The coefficient can theoretically range between 0 and 1, with 1 being the highest possible inequality (for instance: 1 person in a society has all income; the others none). But coefficients that are negative or greater than 1 are also possible because of negative values in the distribution. Compared to other measures of inequality, the Gini coefficient is especially sensitive for changes in the middle of the distribution.

Extension of the gini function in reldist package in order to handle missings.

Value

The value of the Gini coefficient.

Source

Handcock, M. (2016), Relative Distribution Methods. Version 1.6-6. Project home page at http://www.stat.ucla.edu/~handcock/RelDist.

References

Haughton, J. and S. Khandker. (2009) Handbook on poverty and inequality, Washington, DC: World Bank.

Cowell F. (2000) Measurement of Inequality. In Atkinson A. and Bourguignon F. (eds.) Handbook of Income Distribution. Amsterdam: Elsevier, p. 87-166.

Examples

#calculate Gini coefficient using Mexican Income data set
data(mex_inc_2008)

#unweighted Gini coefficient:
gini.wtd(mex_inc_2008$income)

#weighted Gini coefficient:
gini.wtd(x=mex_inc_2008$income, weights=mex_inc_2008$factor)


[Package dineq version 0.1.0 Index]