help for ineqdecginiStephen P. Jenkins (August 2019)

Gini index of inequality, with optional decomposition by subgroups

ineqdecgini varname [weights]
[if exp] [in range]
[, bygroup(groupvar)
summarize ]

fweights, pweights, iweights, and aweights
are allowed; see help weights.

Description

ineqdecgini estimates the Gini coefficient (a.k.a. Gini index) of inequality
plus, optionally, a decomposition by population subgroup into components representing
inequality within groups, inequality between groups, and a residual term, where each
component is non-negative.

Inequality within groups is equal to a subgroup-weighted sum of each subgroup's Gini
index, where each subgroup's weight is equal to the product of the subgroup's income
share and population share. Inequality between groups is equal to the Gini coefficient
arising when each observation is attributed with the mean of `varname' for the subgroup
to which the obs belongs. The residual (a.k.a. overlap) term exists when the income
distributions of each subgroup overlap along the income range; it is equal to zero
in the case when there are no subgroup income distribution overlaps. (An example of
zero overlapping would be when subgroups are defined as the Rich and the Poor, with
the Rich being those with incomes no less than the 90th percentile of varname and
the Poor being those with incomes less than the 90th percentile of varname. For
an application of the Gini decomposition formula in this case, see Jenkins (2017).)

The decomposition formula is provided by, inter alia, Bhattacharya and Mahalanobis (1967),
Pyatt (1976), and Mookherjee and Shorrocks (1982). Lambert and Aronson explain how "the
overlaps [residual] term ... is at once a between groups and a within groups effect: it
measures a between groups phenomenon, overlapping, that is generated by inequality within
groups" (1993: p. 1224). They also explain how the residual component can be understood
as a sub-area of the Lorenz diagram.

For undertaking inequality decompositions by population subgroup, most analysts
deprecate the use of the Gini coefficient as the inequality measure because of the
presence of the residual term. Instead, analysts use Generalised Entropy inequality
indices, because all of them are additively decomposable and there is no residual
component. See e.g. ineqdeco and ineqdec0 for Stata implementations
(available from SSC).

Unit record (`micro' level) data are required. If you have grouped (banded) data,
you should not use this program unless you know what you're doing. Observations with
values of varname less than or equal to zero are not excluded from calculations
(unless otherwise excluded using the if or in options).

groupvar must take non-negative integer values only, and provide an exhaustive
partition of the estimation sample. To create such a variable from an existing variable,
use the egen function group. By default, observations with missing values
on groupvar are excluded from calculations when the bygroup option is specified.
If you wish to include them, create a new variable with the egen function group
and use its missing option. The egen function group is
also useful for multi-way decompositions. E.g. for a decomposition by sex
and region, create a new groupvar defining sex-region combinations by
specifying sex and region in group(varlist).

Options

bygroup(groupvar) requests inequality decompositions by population
subgroup, with subgroup membership summarized by groupvar.

summarize requests presentation of summary, detail output for varname.

Saved results

r(gini) Gini coefficient

r(mean), r(sd), r(Var)	mean, standard deviation, variance
r(min), r(max) minimum, maximum
r(N), r(sumw) Number of observations, sum of weights

If the bygroup option is specified, also saved are:

r(gini_k) Gini for each subgroup k

r(gini_w) Within-groups component
r(gini_b) Between-groups component
r(residual) Residual component

r(gini_w_pc) Within-groups component as % of Gini
r(gini_b_pc) Between-groups component as % of Gini
r(residual_pc) Residual component as % of Gini

r(mean_k), r(lambda_k)	subgroup mean (m_k), and relative mean (m_k/m)
r(theta_k) subgroup income share, s_k
r(sumw_k) subgroup sum of weights
r(v_k) subgroup population share, v_k

r(levels) macro containing the set of values of groupvar
(the number of unique values = K)

Examples

. sysuse nlsw88, clear

. ineqdecgini wage if collgrad == 0, by(race)

. * compare with ineqdec0 results

. ineqdec0 wage if collgrad == 0, by(race)

Author

Stephen P. Jenkins <s.jenkins@lse.ac.uk>

London School of Economics

Acknowledgements

The code for ineqdecgini is based on my ineqdec0 command,
also available from SSC. It was written in response to a Statalist query from
Elif Cengen about results returned from ginidesc: see
here.

References

Bhattacharya, N. and Mahalanobis, B. 1967.
Regional Disparities in Household Consumption in India.
Journal of the American Statistical Association 62: 143-161.

Jenkins, S.P. 2017.
Pareto Models, Top Incomes and Recent Trends in UK Income Inequality.
Economica 84: 261-289.

Lambert, P.J. and Aronson, J. A. 1993.
Inequality Decomposition Analysis and the Gini Coefficient Revisited.
Economic Journal, 103: 1221-1227.

Mookherjee, D. and Shorrocks, A. 1982.
A Decomposition Analysis of the Trend in UK Inequality.
Economic Journal 92: 886-992.

Pyatt, G. 1976.
On the Interpretation and Disaggregation of Gini Coefficients.
Economic Journal 86: 243-255.

Also see

ineqdeco if installed;
ineqdec0 if installed;
sumdist if installed;
svylorenz if installed;
svygei if installed;
svyatk if installed;
povdeco if installed;
ginidesc if installed. All of the programs cited are available from SSC.