version 5.0 use subcvse.dta set more on * Generalized Lorenz example * -------------------------- glcurve eqinc , by(headfem) split replace b1("Generalized Lorenz Curves") b2("Population Share, p_i") xlabel(0,0.25,0.50,0.75,1) ylabel l1("Generalized Lorenz Ordinates, GL[p_i]") more * Lorenz Example * -------------- gen eqinc_m = eqinc for 0 1 , l(n): su eqinc_m if headfem==@ // replace eqinc_m = eqinc_m/_result(3) if headfem==@ glcurve eqinc_m , glvar(lc) pvar(p) by(headfem) split replace nograph graph lc_* p p,s(...) c(lll) b2("Population Share, p_i") xlabel(0,0.25,0.50,0.75,1) ylab(0,0.25,0.50,0.75,1) l1("Lorenz Ordinates, L[p_i]") b1("Lorenz Curves") yline(0,1) xline(0, 1) noaxis more * Concentration curve example * --------------------------- su eqinc replace eqinc_m = eqinc/_result(3) glcurve eqinc_m , gl(lc) p(p) replace nogr su chpay gen mchpay = chpay/_result(3) glcurve mchpay , gl(cc) sort(eqinc_m) nogr graph lc cc p p, c(lll) s(...) b2("Population Share, p_i") xlabel(0,0.25,0.50,0.75,1) ylabel(0,0.25,0.50,0.75,1) l1("Lorenz L[p_i] & Concentration C[p_i]") b1("Lorenz and Concentration Curves") yline(0,1) xline(0, 1) noaxis more * TIP example * ----------- gen tip = (200 - eqinc)*(eqinc<=200) glcurve tip , gl(tip) p(tipp) replace sort(eqinc) by(owner) split xlabel(0,0.25,0.50,0.75,1) ylabel b1("Three I's of Poverty Curves") b2("Population Share, p_i") l1("TIP curves Ordinates, TIP[p_i]") more gen tiprel = (1 - (eqinc/200))*(eqinc<=200) if owner==0 replace tiprel = (1 - (eqinc/170))*(eqinc<=170) if owner==1 glcurve tiprel , gl(tipr) p(tiprp) sort(eqinc) by(owner) split xlabel(0,0.25,0.50,0.75,1) ylabel b1("Three I's of Poverty Curves") b2("Population Share, p_i") l1("TIP curves Ordinates, TIPr[p_i]")