Hello there!!!,
Actually I am trying to compare Lorenz curves (3 different incomes) and I want to construct the line of 45 grades. The Stata code run but my problem is that the graph is wrong, because all incomes appear as straight lines I mean over y axis and those don't look as curves under line 45 that I was created. I want to compare the curves respect to first income= ym. Also if I just graph the curves of incomes is ok, but I graph the curves join with line of 45 there is a problem.
glcurve ym [w=factor],glvar(g1) pvar(p1)
glcurve yn_ [w=factor],glvar(g2) pvar(p2)
glcurve yd [w=factor],glvar(g3) pvar(p3)
gen diagline= g1
label var diagline "45-Degree Line"
*Graphs
twoway ///
(line diagline diagline, sort) (line g1 p1, sort) (line g2 p2, sort) (line g3 p3, sort) plot (line g1 g1) /// , ///
ytitle("Cumulative proportion of income") ///
xtitle("Cumulative proportion of the population") `options' ///
`options' ///
saving(P_graph, replace)
So I am using Stata 11, I hope you can help me.
Thanks.
Actually I am trying to compare Lorenz curves (3 different incomes) and I want to construct the line of 45 grades. The Stata code run but my problem is that the graph is wrong, because all incomes appear as straight lines I mean over y axis and those don't look as curves under line 45 that I was created. I want to compare the curves respect to first income= ym. Also if I just graph the curves of incomes is ok, but I graph the curves join with line of 45 there is a problem.
glcurve ym [w=factor],glvar(g1) pvar(p1)
glcurve yn_ [w=factor],glvar(g2) pvar(p2)
glcurve yd [w=factor],glvar(g3) pvar(p3)
gen diagline= g1
label var diagline "45-Degree Line"
*Graphs
twoway ///
(line diagline diagline, sort) (line g1 p1, sort) (line g2 p2, sort) (line g3 p3, sort) plot (line g1 g1) /// , ///
ytitle("Cumulative proportion of income") ///
xtitle("Cumulative proportion of the population") `options' ///
`options' ///
saving(P_graph, replace)
So I am using Stata 11, I hope you can help me.
Thanks.
Comment