Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

RE:st: multiple lorenz curves with glcurve


From   "philippe van kerm" <philippe.vankerm@ceps.lu>
To   <statalist@hsphsun2.harvard.edu>
Subject   RE:st: multiple lorenz curves with glcurve
Date   Mon, 27 Aug 2007 12:45:08 +0200

>Dear Statalisters,

<SNIP>

>Now I'd like to compare the three Lorenz Curves for income, inc2  &
inc3. I'm using the following code:
>
>
>* CODE STARTS AGAIN ***
>
>glcurve income,gl(g1) p(p1) nograph
>glcurve inc2,gl(g2) p(p2) nograph
>glcurve inc3,gl(g3) p(p3) nograph
>twoway (line g1 p1) (line g2 p2) (line g3 p3) 
>
>*** END CODE ***
>
>
>When I use this code, I get the cumulative population on the x-axis but
it looks 
>like I'm getting actual income (rather than cumulative) on the y-axis. 

Reza,

What you see are the *generalized* Lorenz curves. Use to option -lorenz-
to get Lorenz curves:

glcurve income,gl(g1) p(p1) nograph lorenz
glcurve inc2,gl(g2) p(p2) nograph lorenz
glcurve inc3,gl(g3) p(p3) nograph lorenz


> My question is: (1) How do I change this to plot the three measures
simulataneously? 
>(2) How do I include the 45 degree line on the graph?

Use -twoway function- to get the 45 degree line  

	twoway (line g1 p1, sort) (line g2 p2, sort) (line g3 p3, sort)
(function y=x ,range(0 1)) 

Hope this helps,

Philippe



**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

This footnote also confirms that this email message has been swept 
**********************************************************************



*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



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