Statalist


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

Re: st: RE: lorenz curve


From   [email protected]
To   [email protected]
Subject   Re: st: RE: lorenz curve
Date   Thu, 22 Jan 2009 11:51:00 +0100

Ok, but I have a problem.

I have to construct a single graph whit Lorenz curve of varname, lorenz curve of varname where population are ordered in descending order of varname and a 45° line. To construct the Loren curve where population are ordered in descending order of varname I typed:
glcurve var , lorenz
gen minvar = 0-var
glcurve var , sortvar(minvar) lorenz gl(t) gl(s) then, for the "traditional" lorenz curve:
glcurve7 var if area3==1, lorenz gl(t1) p(s2) and to have a single graph:
line s t||function y=x||line t1 s2

But in this way the graph show me the 45° line, but the traditional lorenz curve is now similar to that construct ordring population in descending order..so both up the 45° line.
Would it can be the fail?



Quoting [email protected]:

Ok, but I have installed glcurve7, is it ok? Are there difference between glcurve7 and glcurve?






uoting philippe van kerm <[email protected]>:

-glcurve- available from the Stata Journal website or the SSC archive will do that.

To order your observations in descending order (rather than the default ascending order), you can use the -sortvar()- option:

ssc install glcurve
glcurve var , lorenz
gen minvar = 0-var
glcurve  var , sortvar(minvar) lorenz

read the help file for -glcurve- to find out about options for saving curve coordinates for later customizing the resulting plot or combining curves.

Good luck
Philippe


-----Message d'origine-----
De : [email protected] [mailto:owner-
[email protected]] De la part de [email protected]
Envoyé : Thursday, January 22, 2009 8:51 AM
À : [email protected]
Objet : st: lorenz curve

Hello,
Is it possible to construct a lorenz curve of a varname computed whit a
population ordered in descending order of varname? Then, is it possible
create a graph with both these curves?

Thank a lot
Claudia

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/





*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/





*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index