------------------------------------------------------------------------------- help forglcurve(STB-48: sg107; STB-49: sg107_1; SJ1-1: gr0001; SJ4-4: gr0001_1; SJ6-4: gr0001 > _2; SJ7-2: gr0001_3; ??) -------------------------------------------------------------------------------

Derivation of generalised Lorenz curve ordinates with unit record data

glcurvevarname[weight] [ifexp] [inrange] [,pvar(newvarname)glvar(newvarname)sortvar(varname)by(varname)splitnographreplacelorenzatip(string)rtip(string)plot(plot)graph_options]

aweights andfweights are allowed; see help weights.

DescriptionGiven a variable

varname, call it x with c.d.f. F(x),glcurvedraws its Generalised Lorenz curve and/or generates two new variables containing the Generalised Lorenz ordinates for x, i.e. GL(p) at each p = F(x). For a population ordered in ascending order of x, a graph of GL(p) against p plots the cumulative total of x divided by population size against cumulative population share GL(1) = mean(x).glcurvecan also be used to derive many other related concepts such as Lorenz curves, concentration curves and 'Three Is of Poverty' (TIP) curves, with appropriate definition ofvarname, order of cumulation (set with thesortvaroption), and normalisation (e.g. by the mean ofvarname). Alternativelyglcurvewith thelorenz,atiporrtipoption can be used directly to draw the related Lorenz, concentration and TIP curves.Comparisons of pairs of distributions (and dominance checks) can be undertaken by using the

by()(with or without thesplit) options. It can also be made manually by 'stacking' the data (see help on stack).The graphs drawn by

glcurveare relatively basic. For graphs with full user control over formatting and labelling, users are recommended to useglcurveto generate the ordinates of the graph required using thepvar(newvarname)andglvar(newvarname)options, and then to draw the graph using graph twoway.

Options

pvar(pvarname)generates the variablepvarnamecontaining the x coordinates of the created curve.

glvar(glvarname)generates the variableglvarnamecontaining the y coordinates of the created curve.

sortvar(sname)specifies the sort variable. By default, the data are sorted (and cumulated) in ascending order ofvarname. If thesortvaroption is specified, sorting and cumulation is in ascending order of variablesname. Within tied values ofsname, data are sorted in ascending order ofvarname.

by(groupvar)specifies that the coordinates are to be computed separately for each subgroup defined bygroupvar.groupvarmust be an integer variable.

splitspecifies that a series of new variables are created containing the coordinates for each subgroup specified byby(groupvar).splitcan not be used withoutby(). Ifsplitis specified, then the stringglnameinglvar(glname)is used as a prefix to create new variablesglname_X1,glname_X2,... (where X1, X2, ... are the values taken bygroupvar).

nographavoids the automatic display of a crude graph made out of the created variables.nographis assumed ifby()is specified withoutsplit.

replaceallows the variables specified inglvar(glvarname)andpvar(pvarname)to be overwritten if they already exist. Otherwiseglvarnameandpvarnamemust be new variable names.

lorenzrequires that the ordinates of the Lorenz curve are computed instead of generalised Lorenz ordinates. The Lorenz ordinates of variable x, L(p), are GL(p)/mean(x).

rtip(povline)andatip(povline)require that the ordinates of TIP curves are computed instead of generalised Lorenz ordinates.povlinespecifies the value of the poverty line: it can be either a numeric value taken as the poverty line for all observations or a variable name containing the value of the poverty line for each observation.atip()draws 'absolute' TIP curves (by cumulating max(z-x,0)) andrtip()draws 'relative' TIP curves (by cumulating max(1-(x/z),0)).

plot(plot)provides a way to add other plots to the generated graph; see plot option.

graph_optionsare standard twoway scatter options. Note that modifications to the legend labels should be made with thelegend(order(...)options instead oflegend(label(...)(see help legend_option).

ExamplesMany

glcurveexamples are provided in the downloadable materials provided by Jenkins (2006).

. * Generalized Lorenz curve ordinates; plot using -graph twoway-

. glcurve x, gl(gl1) p(p1) nograph

. twoway line gl1 p1

. * Lorenz curve ordinates; plot using -glcurve-

. glcurve x, lorenz plot(function equality = x)

. * Lorenz curve ordinates; plot using -glcurve-; options

. glcurve x [fw=wgt] if x > 0, gl(gl2) p(p2) lorenz

. * Generalised Lorenz curve ordinates and graphs, by state

. glcurve x, gl(gl2) p(p2) replace sort(y) by(state) split

. * TIP curve ordinates with graph

. glcurve x, gl(gl3) p(p3) atip(10000)

. glcurve x, gl(gl3) p(p3) atip(plinevar)

. * Lorenz curve ordinates; plot using -graph twoway-

. glcurve x, gl(gl) p(p) lorenz nograph

. twoway line gl p , sort || line p p , ///xlabel(0(.1)1) ylabel(0(.1)1) ///xline(0(.2)1) yline(0(.2)1) ///title("Lorenz curve") subtitle("Example with custom formatting") ///legend(label(1 "Lorenz curve") label(2 "Line of perfect equality")) ///plotregion(margin(zero)) aspectratio(1) scheme(economist)

Notes

glcurveis designed to be used with individual-level, unit-record data. Althoughglcurvecan also be applied mechanically to grouped (`banded') income data usingfweights, be aware that the resulting curve is a potentially poor estimate, because within-income-band inequality is not taken into account. On the estimation of Lorenz curves and inequality indices with grouped data, see e.g. Gastwirth and Glaubermann (1976) or Cowell and Mehta (1982).One must also be careful in using the ordinates returned from the option

pvarfor subsequent computation of the Gini or Concentration coefficient using the 'convenient covariance' formulae described by e.g. Lerman and Yitzhaki (1984, 1989) or Jenkins (1988). The ordinates returned inpvarare the curve ordinates (and are equal to estimates obtained fromcumul) and these are not necessarily the fractional ranks required in the covariance formula. The difference is generally negligible with continuous unit-record data, but is larger if there are many ties in the ranking variable (as in the case, e.g., for the concentration coefficient based on an ordinal categorical variable, or when dealing with grouped data).

AcknowledgementsNicholas J. Cox helped with updating the code for our program from Stata 7 (glcurve7) to Stata 8. David Demery, Owen O'Donnell, Shehzad Ali made useful bug reports. Comments by Zhuo (Adam) Chen lead to introduction of 'sort stable' estimation for concentration curves.

AuthorsPhilippe Van Kerm, CEPS/INSTEAD, Differdange, G.-D. Luxembourg philippe.vankerm@ceps.lu

Stephen P. Jenkins, ISER, University of Essex stephenj@essex.ac.uk

ReferencesCowell, F.A. 1995.

Measuring Inequality(second edition). Hemel Hempstead: Prentice-Hall/Harvester-Wheatsheaf.Cowell, F.A. and Mehta, F. 1982. The Estimation and Interpolation of Inequality Measures.

Review of Economic Studies49(2): 273-290.Gastwirth, J.L. and Glauberman, M. 1976. The Interpolation of the Lorenz Curve and Gini Index from Grouped Data.

Econometrica44(3): 479-483.Jenkins, S.P. 1988. Calculating income distribution indices from microdata.

National Tax Journal61: 139-142.Jenkins, S.P. 2006. Estimation and interpretation of measures of inequality, poverty, and social welfare using Stata. Presentation at North American Stata Users' Group Meetings 2006, Boston MA. http://econpapers.repec.org/paper/bocasug06/16.htm.

Jenkins, S.P. and Lambert, P.J. 1997. Three 'I's of poverty curves, with an analysis of UK poverty trends.

Oxford Economic Papers49: 317-327.Lambert, P.J. 2001.

The Distribution and Redistribution of Income(third edition). Manchester: Manchester University Press.Lerman, R.I. and Yitzhaki, S. 1984. A note on the calculation and interpretation of the Gini index.

Economics Letters15(3-4): 363-368.Lerman, R.I. and Yitzhaki, S. 1989. Improving the Accuracy of Estimates of Gini Coefficients.

Journal of Econometrics42(1): 43-47.Shorrocks, A.F. 1983. Ranking income distributions.

Economica197: 3-17.

Also seeManual:

[R] lorenzSTB:STB-48 sg107,STB-49 sg107.1,SJ 1(1) gr0001On-line: help for sumdist, svylorenz (if installed)