Hi all,
I seek to produce a relatively descriptive analysis of the share of employment within different manufacturing sectors over a period of interest. In this case, the commodity boom period (2002-2014). To capture the heterogeneity that exists between my countries, I have regressed the share of employment within each sector against total employment over my period of interest (a dummy that takes the value of 1 for the years of interest) and included an interaction term between my period of interest and a dummy that takes the value of "1" for each country in my sample (9). My code is as follows and works.
In addition to my results, I wanted to produce a graphical representation using Coeffplots and the margins of error calculated using the Taylor approximation method (i.e., code above). However, I have a problem because I cannot link each of my estimates with my labels which I would like to place, not in the graph region, but on the y-axis. Here is my code:
I tried several methods, but no way to link my "mgeBOL", "mgeBRA" with my ylabel "BOL", "BRA", etc. So I get the following output (below). Could I have some help?
I seek to produce a relatively descriptive analysis of the share of employment within different manufacturing sectors over a period of interest. In this case, the commodity boom period (2002-2014). To capture the heterogeneity that exists between my countries, I have regressed the share of employment within each sector against total employment over my period of interest (a dummy that takes the value of 1 for the years of interest) and included an interaction term between my period of interest and a dummy that takes the value of "1" for each country in my sample (9). My code is as follows and works.
Code:
levelsof Country_ABV, local(Country_local) foreach x of local Country_local { gen `x'= 0 replace `x'=1 if Country_ABV == "`x'" eststo gie`x': reg Share_Employment_Sectors_WP $Controls i.GP##`x' i.Country i.Sectors, cluster(Country) margins, dydx(i.GP) over(`x') eststo mge`x': margins if `x'==1, dydx(i.GP) post }
Code:
coefplot /// (mgeBOL, ms(o) mcolor(black) ciopts(recast(rcap) color(black))) /// (mgeBRA, ms(o) mcolor(black) ciopts(recast(rcap) color(black))) /// (mgeCHL, ms(o) mcolor(black) ciopts(recast(rcap) color(black))) /// (mgeCOL, ms(o) mcolor(black) ciopts(recast(rcap) color(black))) /// (mgeCRI, ms(o) mcolor(black) ciopts(recast(rcap) color(black))) /// (mgeECU, ms(o) mcolor(black) ciopts(recast(rcap) color(black))) /// (mgeMEX, ms(o) mcolor(black) ciopts(recast(rcap) color(black))) /// (mgePER, ms(o) mcolor(black) ciopts(recast(rcap) color(black))) /// (mgeURY, ms(o) mcolor(black) ciopts(recast(rcap) color(black))) /// , /// ysize(5) legend(off) ylabel(none) /// xsize(5) xlabel() /// xline(0, lcolor(black) lpattern(solid)) /// ylabel(1 "BOL" 2 "BRA" 3 "CHL" 4 "COL" 5 "CRI" 6 "ECU" 7 "MEX" 8 "PER" 9 "URY", angle(0)) /// title("{bf: - Heterogeneity in Formal Employment -}", color(black) margin(bottom) size(3.5)) /// horizontal /// graphregion(color(white)) graph save "$dirrfigs\Model 2 - Employment Heterogeneity.dta", replace graph export "$dirrfigs\Model 2 - Employment Heterogeneity.png", replace
Comment