#delim ; set more off; /* this is data generating part: do not change */ program drop _all; tempname year1996 year2001; clear; set obs 4000; quietly {; set seed 1234567; generate exp1 = 4+invnorm(uniform()); generate region = 1; replace region = 2 if inrange(_n,1001,1500); replace region = 3 if inrange(_n,1501,3200); replace region = 4 if inrange(_n,3201,4000); label define region 1 "North" 2 "South" 3 "West" 4 "East"; label values region region; save `year1996', replace; clear; set obs 8000; generate exp2 = 5+sin(invnorm(uniform()))+invnorm(uniform()); generate region = 1; replace region = 2 if inrange(_n,2001,3000); replace region = 3 if inrange(_n,3001,6000); replace region = 4 if inrange(_n,6001,8000); label define region 1 "North" 2 "South" 3 "West" 4 "East"; label values region region; save `year2001', replace; }; // end quietly /***********************************************/ /************************************************/ /* two files year1996 and year2001 */ /* Expenditure in the first year exp1 */ /* Expenditure in the second year exp2 */ /* There are two regions 1 and 2 */ /************************************************/ use `year1996', clear; display _newline(4) as result "Growth-Inquality poverty decomposition, press Enter to continue" _request(k1); gidecomposition using `year2001', pline1(3) pline2(3.2) var1(exp1) var2(exp2); display _newline(4) as result "Sectoral poverty decomposition, press Enter to continue" _request(k1); sedecomposition using `year2001', pline1(3) pline2(3.2) var1(exp1) var2(exp2) sector(region) pgs; display _newline(4) as result "Stochastic dominance graph, press Enter to continue" _request(k1); pov_robust using `year2001', var1(exp1) var2(exp2) pi title(Poverty Incedence curve, size(3) position(11) ) // these are graph options ytitle(% of population below poverty line, size(2.8)) // these are graph options ylabel(0(0.25)1, gmax angle(horizontal)) // these are graph options legend(pos(11) ring(0) col(2) size(2.6) lab(1 "Year 1") lab(2 "Year 2") // these are graph options symxsize(10) region(style(none)) margin(zero) bmargin(zero) ) // these are graph options ; display _newline(4) as result "Growth incidence curve, press Enter to continue" _request(kl); gicurve using `year2001' if region==1, var1(exp1) var2(exp2) yp(5) np(200) bands(200) // these are gicurve options ginmean gatmedian mgrpp meangr // these are gicurve options title(Growth Incidence curve: Region 1, size(3) position(11) ) // these are graph options ytitle(Annual growth rate %, size(2.8)) // these are graph options ylabel(4(1)8, gmax angle(horizontal)) // these are graph options legend(pos(1) ring(0) col(1) size(2.6) lab(1 "Growth incidence curve") // these are graph options symxsize(10) region(style(none)) margin(zero) bmargin(zero) ) // these are graph options ;