Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: Need help with glcurve

From   <>
To   <>
Subject   st: Need help with glcurve
Date   Sun, 27 Feb 2011 12:51:36 -0000


Date: Sat, 26 Feb 2011 20:56:17 +0000
From: Stata Stata <>
Subject: st: Need help with glcurve


I am working with grouped data on longitudinal form. I want to draw a
concentration curve using glcurve (or so I think).

What I've got so far is:

glcurve health, glvar(yord) pvar(rank) sortvar(income) replace
by(year) split lorenz nograph

where health is a binomial variable (with 0 for absent morbidity and 1
for morbidity) and
income is a number from 1-14 for different income groups.
Year is also a binomial variable (with 0 for the year 2007 and 1 for
the year 2009)

Then I use twoway to draw the curve, but the graph doesn't look right
to me. The lines for the two years I'm working with look like steps,
with the line of equality in the middle.

Am I doing something wrong? Should I be using a frequency weight and
if so, how do I create it?

Best regards,
Maria Erla

-glcurve- is available on SSC. It is designed to use unit record data,
not grouped data as you have.

Put differently, the default way in which -graph twoway- is connecting
your points is a reminder of the grouping. The graph is implementing a
particular assumption about the distribution of values within each
interval defined by your variable (health) which is recorded in grouped
form.  If you want to make a different assumption, that is up to you.
But be aware that assumptions are inevitable (a consequence of
information being lost when there is grouping rather a continuous
variable). Using weights does not solve the problem.

There is a related literature on the estimation of Lorenz curves, and
inequality indices such as the Gini coefficient. [Cf. e.g. Cowell and
Mehta, Review of Economic Studies, 1983 I think]  Also related is the
literature on survival analysis, and the relationship between estimates
from continuous and discrete time duration data.

Stephen (-glcurve- co-author, with Philippe Van Kerm)
Professor Stephen P. Jenkins  <>
Department of Social Policy and STICERD
London School of Economics and Political Science
Houghton Street
London WC2A 2AE, U.K.
Tel. +44 (0)20 7955 6527
Survival Analysis using Stata:
Downloadable papers and software:

Please access the attached hyperlink for an important electronic communications disclaimer:

*   For searches and help try:

© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index