Dear Sir/Madam, colleagues,
I tried to plot a concentration curve with the following commend from some literatures but did not get a figure.
Please kindly correct and guide me further.
glcurve outcome1 [aw=wgt], glvar(g1) pvar(p1) sortvar(v191) lorenz nograph
glcurve outcome2 [aw=wgt], glvar(g2) pvar(p2) sortvar(v191) lorenz nograph
glcurve outcome3 [aw=wgt], glvar(g3) pvar(p3) sortvar(v191) lorenz nograph
glcurve outcome4 [aw=wgt], glvar(g4) pvar(p4) sortvar(v191) lorenz nograph
label variable g1 "g1"
label variable g2 "g2"
label variable g3 "g3"
label variable g4 "g4"
graph twoway (line g1 p1, sort yaxis(1 2)) ///
(line g2 p2, sort yaxis(1 2)) ///
(line g3 p3, sort yaxis(1 2)) ///
(line g4 p4, sort yaxis(1 2)) ///
(function y=x, range(0 1) yaxis(1 2)) ///
, aspect(1) xtitle("cumulative proportion share, p") ///
title("Lorenz curve comparison") ///
ytitle("cumulative proportion wealth") ///
legend(label(1 "outcome1") label(2 "outcom2") label (3 "outcome3") label(4 "outcome4") ///
saving(test.gph)
Where outcome 1-4 are the dichotomous (0 1) and v191 is the continuous variable.
I tried to include all 4 outcomes in single figure as the inquality variable is the same.
Thanking in advance.
SHOW
Related Posts with Seek help for concentration curve
CSDID Implementation after collapsing on state levelI have been trying to use calloway and Santanna DiD on IPUMS CPS data but not doing so well due to h…
receiving different error among using loop and using do filehello everyone. I use this code to merge 5 time horizon of my estimation but i receive lots of error…
Diff in Diff in balanced panel with multiple treatment periodsHi all, I have a dataset looking as follows: Code: * Example generated by -dataex-. To install: s…
Conflict results from "cc" command?Hello everyone, I was running cc command, and got the output below: Array The test of homogeneity …
Question about How to Divide Observations within a Single Variable using LoopsHello, I have GDP per capita data for the USA and USSR, along with the year, country codes and a dum…
Subscribe to:
Post Comments (Atom)
0 Response to Seek help for concentration curve
Post a Comment