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
analysis on two-eye datasetHello, I am trying to compare the intraocular pressure (IOP, a continuous variable) between two trea…
Export data in histogramI am new to stata (I am using version Stata/IC 12.1 for Mac, 64-bit Intel) and succeeded in producin…
Intraclass correlations with meologit?Hi all, I'm revisiting my analysis for a revise & resubmit article but I'm having trouble repli…
Cox model margins estimatesDear colleagues, I am using STATA version 15.1 and am struggling to estimate margins for a continuo…
How to introduce initial values in CMP for 4 eq. TobitsHi, I am estimating a model with 4 equations, each of them Tobit for a Time Use Survey (US edition).…
Subscribe to:
Post Comments (Atom)
0 Response to Seek help for concentration curve
Post a Comment