help for sginiP. Van Kerm (April 2020, February 2010, September 2009)

Title

sgini -- Generalized Gini and Concentration coefficients (with factor decomposition)

Syntax

sgini
varlist
[weight]
[if exp]
[in range]
[, options]

parameters(numlist) specifies inequality aversion parameters

sourcedecomposition requests factor decomposition (decomposition by source)

aggregate switches to computation of S-Gini welfare indices

welfare is synonymous to aggregate

absolute switches to computation of absolute S-Gini indices

sortvar(varname) sets ordering variable for Concentration coefficients

fracrankvar(varname) passes a varname with existing fractional ranks

format(%fmt) display format; default is format(%5.4f)

varlist may contain time-series operators; see tsvarlist.

bootstrap, jackknife, svy bootstrap, and svy jackknife prefixes are allowed; see prefix.

fweight, aweight and pweight are allowed; see help weights.

Description

sgini is a command for calculations of generalized Gini (a.k.a. S-Gini) and Concentration
coefficients from unit-record data. sgini computes relative (scale invariant)
Gini indices of inequality by default but can be requested to produce absolute (translation invariant)
indices or aggregate welfare S-Gini indices. The command can also optionally report decomposition by
factor components (income sources).

Multiple variables and multiple inequality aversion parameters can be passed to sgini. Beware that if
multiple variables are input, sgini will discard observations with missing data on any of the
input variables and compute all coefficients on the resulting sample.

sgini does not provide sampling variance estimates (as an r-class command) but it is easily bootstrapped using
a bootstrap or prefix. See the user-written svylorenz, lorenz or inequaly for
estimation of Gini coefficients with (analytic) standard errors.

An accompanying online manual provides details on formulas, option
descriptions and usage examples.

Options

parameters(numlist) specifies inequality aversion parameters. Default is 2 leading to the standard Gini and
Concentration coefficients. Multiple parameters can be requested.

sortvar(varname) sets ordering variable for Concentration coefficients. Default is to cumulate the variable(s)
of interest against themselves, leading to Gini coefficients.

fracrankvar(varname) passes the name of an existing variable containing fractional ranks based on which
the Gini and Concentration coefficients can be computed. This is a rarely used and dangerous option, but it may
provide considerable speed gains under certain circumstances.
It is essential that the fractional rank variable be computed correctly (using e.g. fracrank), and on the adequate (sub-)sample (think missing data, if clauses, ordering). Use carefully!

sourcedecomposition requests factor decomposition of indices. It is relevant when more than one variable is passed
in varlist. It requests that a variable be created by taking the row sum of all elements in varlist,
computes the Gini (or Concentration) coefficient for this created variable, and estimates the contribution of
each element of varlist to the latter by applying the 'natural' decomposition rule for Gini coefficients
(see Lerman & Yitzhaki, 1985).

aggregate and absolute request, respectively, computation of aggregate S-Gini welfare measures
or computation of absolute Gini and Concentration coefficients, instead of the relative inequality measures.
They are mutually exclusive and incompatible with sourcedecomposition. welfare is synonymous to aggregate.

format(%fmt) controls the display format; default is format(%5.4f).

Saved Results

Matrices

r(coeffs) estimated coefficients

r(parameters) parameters from param(numlist)

r(r) Gini correlations between source and total income (if sourcedecomposition requested)

r(c) Concentration coefficients of each source (if sourcedecomposition requested)

r(elasticity) elasticities between source and total Gini (if sourcedecomposition requested)

r(s) factor shares (if sourcedecomposition requested)

Scalars

r(N) number of observations

r(sum_w) sum of weights

r(coeff) estimated coefficient for first variable, first parameter

Macros

r(varlist) varlist

r(paramlist) list of parameters from param(numlist)

r(sortvar) varname if sortvar(varname) specified

Example

. use http://www.stata-press.com/data/r9/nlswork , clear

. tsset idcode year

. gen w = exp(ln_wage)

. sgini w

. sgini w , param(1.5(.5)5) absolute

. sgini w L.w L2.w

. sgini w L.w L2.w , sortvar(w)

. sgini w L.w L2.w , source

. bootstrap G=r(coeff) , reps(250) nodots : ///

sgini w if !mi(w)

. jackknife G=r(coeff) rclass nodots : ///

sgini w if !mi(w)

References

Chotikapanich, D. C. & Griffiths, W. (2001), On calculation of the extended gini coefficient, Review of Income and Wealth, 47: 541-547.

Lerman, R. I. & Yitzhaki, S. (1985), Income inequality effects by income source: A new approach and applications to the United States, Review of Economics and Statistics, 67(1): 151-156.

Lopez-Feldman, A. (2006), Decomposing inequality and obtaining marginal effects, Stata Journal, 6(1): 106-111.

Also see

Manual: [R] inequality

Online: descogini (if installed), ineqdeco (if installed), svylorenz (if installed), inequal7 (if installed),
among several others

Author

Philippe Van Kerm, Luxembourg Institute of Socio-Economic Research (LISER) and University of Luxembourg, philippe.vankerm@liser.lu

Acknowledgments

This package was originally written for the MeDIM project
(Advances in the Measurement of Discrimination, Inequality and Mobility)
supported by the Luxembourg Fonds National de la Recherche (contract FNR/06/15/08)
and by core funding for CEPS/INSTEAD by the
Ministry of Culture, Higher Education and Research of Luxembourg.