*******Verdienststrukturerhebung 2010********* ********************************************** ********************************************** ************ Syntax 6: MMM ******************* ********************************************** clear clear matrix set more off, perm set scrollbufsize 50000 set matsize 11000, perm numlabel _all, add set rmsg on use "${orig}\vse_work.dta", clear capture log using ${log}\cvm_plots, text replace ***Seed for Subsample (30%) set seed 5016 sample 30 *controls global control "educ exp exp2 exp3 exp4 tenure i.isco i.wzweig i.ft_gen i.empl_firm i.public i.schicht i.bargaining i.besch i.craftsman i.ef9" *Melly, both reference grouos recode female(0=1)(1=0), gen(male) ******CVM, female reference xi: cdeco ln_wage ost $control, group(male) noboot /// quantiles( 0.03 0.05 0.07 0.09 0.11 0.13 /// 0.15 0.17 0.19 0.21 0.23 0.25 0.27 0.29 /// 0.31 0.33 0.35 0.37 0.39 0.41 0.43 0.45 /// 0.47 0.49 0.51 0.53 0.55 0.57 0.59 0.61 /// 0.63 0.65 0.67 0.69 0.71 0.73 0.75 0.77 /// 0.79 0.81 0.83 0.85 0.87 0.89 0.91 0.93 /// 0.95 0.97 ) *Plot decomposition results mat tot=e(total_difference) mat char=e(characteristics) mat coef=e(coefficients) mat quant=e(quantiles) svmat tot svmat char svmat coef svmat quant twoway (line tot1 quant1) (line char1 quant1) (line coef1 quant1), ytitle(Quantile Effect) xtitle("Quantile", size(small)) legend(order(1 "Total difference" 2 "Effects of characteristics" 3 "Effects of coefficients") ) /// ytitle("Log Wage Differential", size(small)) graphr(fcolor(white) lc(white)) scheme(sj) title("Germany - Female", size(small)) cd "$tex" graph save cdecofull_female.gph, replace graph2tex, epsfile (cdecofull_female) caption(Cdeco all)label(cdecofull_female) *****CVM, male reference xi: cdeco ln_wage ost $control, group(female) noboot /// quantiles( 0.03 0.05 0.07 0.09 0.11 0.13 /// 0.15 0.17 0.19 0.21 0.23 0.25 0.27 0.29 /// 0.31 0.33 0.35 0.37 0.39 0.41 0.43 0.45 /// 0.47 0.49 0.51 0.53 0.55 0.57 0.59 0.61 /// 0.63 0.65 0.67 0.69 0.71 0.73 0.75 0.77 /// 0.79 0.81 0.83 0.85 0.87 0.89 0.91 0.93 /// 0.95 0.97 ) *Unterschiede 𢥲 die Verteilung plotten mat tot2=e(total_difference) mat char2=e(characteristics) mat coef2=e(coefficients) mat quant2=e(quantiles) svmat tot2 svmat char2 svmat coef2 svmat quant2 twoway (line tot21 quant21) (line char21 quant21) (line coef21 quant21), ytitle(Quantile Effect) xtitle("Quantile", size(small)) legend(order(1 "Total difference" 2 "Explained" 3 "Unexplained") c(3) size(small) bmargin(small) symysize(.5)) /// ytitle("Log Wage Differential", size(small)) graphr(fcolor(white) lc(white)) scheme(sj) title("Germany - Male", size(small)) cd "$tex" graph save cdecofull_male.gph, replace graph2tex, epsfile (cdecofull_male) caption(Cdeco all)label(cdecofull_male) *********West Germany preserve keep if ost==0 clear matrix ******CVM, female reference xi: cdeco ln_wage ost $control, group(male) noboot /// quantiles( 0.03 0.05 0.07 0.09 0.11 0.13 /// 0.15 0.17 0.19 0.21 0.23 0.25 0.27 0.29 /// 0.31 0.33 0.35 0.37 0.39 0.41 0.43 0.45 /// 0.47 0.49 0.51 0.53 0.55 0.57 0.59 0.61 /// 0.63 0.65 0.67 0.69 0.71 0.73 0.75 0.77 /// 0.79 0.81 0.83 0.85 0.87 0.89 0.91 0.93 /// 0.95 0.97 ) *Plot decomposition results mat tot3=e(total_difference) mat char3=e(characteristics) mat coef3=e(coefficients) mat quant3=e(quantiles) svmat tot3 svmat char3 svmat coef3 svmat quant3 twoway (line tot31 quant31) (line char31 quant31) (line coef31 quant31), ytitle(Quantile Effect) xtitle("Quantile", size(small)) legend(order(1 "Total difference" 2 "Effects of characteristics" 3 "Effects of coefficients")) /// ytitle("Log Wage Differential", size(small)) graphr(fcolor(white) lc(white)) scheme(sj) title("West Germany - Female", size(small)) cd "$tex" graph save cdecowest_female.gph, replace graph2tex, epsfile (cdecowest_female) caption(Cdeco all)label(cdecofull_female) *****CVM, male reference xi: cdeco ln_wage ost $control, group(female) noboot /// quantiles( 0.03 0.05 0.07 0.09 0.11 0.13 /// 0.15 0.17 0.19 0.21 0.23 0.25 0.27 0.29 /// 0.31 0.33 0.35 0.37 0.39 0.41 0.43 0.45 /// 0.47 0.49 0.51 0.53 0.55 0.57 0.59 0.61 /// 0.63 0.65 0.67 0.69 0.71 0.73 0.75 0.77 /// 0.79 0.81 0.83 0.85 0.87 0.89 0.91 0.93 /// 0.95 0.97 ) *Unterschiede 𢥲 die Verteilung plotten mat tot4=e(total_difference) mat char4=e(characteristics) mat coef4=e(coefficients) mat quant4=e(quantiles) svmat tot4 svmat char4 svmat coef4 svmat quant4 twoway (line tot41 quant41) (line char41 quant41) (line coef41 quant41), ytitle(Quantile Effect) xtitle("Quantile", size(small)) legend(order(1 "Total difference" 2 "Effects of characteristics" 3 "Effects of coefficients")) /// ytitle("Log Wage Differential", size(small)) graphr(fcolor(white) lc(white)) scheme(sj) title("West Germany - Male", size(small)) cd "$tex" graph save cdecowest_male.gph, replace graph2tex, epsfile (cdecowest_male) caption(Cdeco all)label(cdecofull_male) restore *********East Germany preserve keep if ost==1 clear matrix ******CVM, female reference xi: cdeco ln_wage ost $control, group(male) noboot /// quantiles( 0.03 0.05 0.07 0.09 0.11 0.13 /// 0.15 0.17 0.19 0.21 0.23 0.25 0.27 0.29 /// 0.31 0.33 0.35 0.37 0.39 0.41 0.43 0.45 /// 0.47 0.49 0.51 0.53 0.55 0.57 0.59 0.61 /// 0.63 0.65 0.67 0.69 0.71 0.73 0.75 0.77 /// 0.79 0.81 0.83 0.85 0.87 0.89 0.91 0.93 /// 0.95 0.97 ) *Plot decomposition results mat tot5=e(total_difference) mat char5=e(characteristics) mat coef5=e(coefficients) mat quant5=e(quantiles) svmat tot5 svmat char5 svmat coef5 svmat quant5 twoway (line tot51 quant51) (line char51 quant51) (line coef51 quant51), ytitle(Quantile Effect) xtitle("Quantile", size(small)) legend(order(1 "Total difference" 2 "Effects of characteristics" 3 "Effects of coefficients")) /// ytitle("Log Wage Differential", size(small)) graphr(fcolor(white) lc(white)) scheme(sj) title("East Germany - Female", size(small)) cd "$tex" graph save cdecoeast_female.gph, replace graph2tex, epsfile (cdecoeast_female) caption(Cdeco all)label(cdecofull_female) *****CVM, male reference xi: cdeco ln_wage ost $control, group(female) noboot /// quantiles( 0.03 0.05 0.07 0.09 0.11 0.13 /// 0.15 0.17 0.19 0.21 0.23 0.25 0.27 0.29 /// 0.31 0.33 0.35 0.37 0.39 0.41 0.43 0.45 /// 0.47 0.49 0.51 0.53 0.55 0.57 0.59 0.61 /// 0.63 0.65 0.67 0.69 0.71 0.73 0.75 0.77 /// 0.79 0.81 0.83 0.85 0.87 0.89 0.91 0.93 /// 0.95 0.97 ) *Unterschiede 𢥲 die Verteilung plotten mat tot6=e(total_difference) mat char6=e(characteristics) mat coef6=e(coefficients) mat quant6=e(quantiles) svmat tot6 svmat char6 svmat coef6 svmat quant6 twoway (line tot61 quant61) (line char61 quant61) (line coef61 quant61), ytitle(Quantile Effect) xtitle("Quantile", size(small)) legend(order(1 "Total difference" 2 "Effects of characteristics" 3 "Effects of coefficients")) /// ytitle("Log Wage Differential", size(small)) graphr(fcolor(white) lc(white)) scheme(sj) title("East Germany - Male", size(small)) cd "$tex" graph save cdecoeast_male.gph, replace graph2tex, epsfile (cdecoeast_male) caption(Cdeco all)label(cdecofull_male) restore *********public Germany preserve keep if public==1 clear matrix ******CVM, female reference xi: cdeco ln_wage ost $control, group(male) noboot /// quantiles( 0.03 0.05 0.07 0.09 0.11 0.13 /// 0.15 0.17 0.19 0.21 0.23 0.25 0.27 0.29 /// 0.31 0.33 0.35 0.37 0.39 0.41 0.43 0.45 /// 0.47 0.49 0.51 0.53 0.55 0.57 0.59 0.61 /// 0.63 0.65 0.67 0.69 0.71 0.73 0.75 0.77 /// 0.79 0.81 0.83 0.85 0.87 0.89 0.91 0.93 /// 0.95 0.97 ) *Plot decomposition results mat tot7=e(total_difference) mat char7=e(characteristics) mat coef7=e(coefficients) mat quant7=e(quantiles) svmat tot7 svmat char7 svmat coef7 svmat quant7 twoway (line tot71 quant71) (line char71 quant71) (line coef71 quant71), ytitle(Quantile Effect) xtitle("Quantile", size(small)) legend(off) /// ytitle("Log Wage Differential", size(small)) graphr(fcolor(white) lc(white)) scheme(sj) title("Public sector - Female", size(small) ) cd "$tex" graph save cdecopublic_female.gph, replace graph2tex, epsfile (cdecopublic_female) caption(Cdeco all)label(cdecofull_female) *****CVM, male reference xi: cdeco ln_wage ost $control, group(female) noboot /// quantiles( 0.03 0.05 0.07 0.09 0.11 0.13 /// 0.15 0.17 0.19 0.21 0.23 0.25 0.27 0.29 /// 0.31 0.33 0.35 0.37 0.39 0.41 0.43 0.45 /// 0.47 0.49 0.51 0.53 0.55 0.57 0.59 0.61 /// 0.63 0.65 0.67 0.69 0.71 0.73 0.75 0.77 /// 0.79 0.81 0.83 0.85 0.87 0.89 0.91 0.93 /// 0.95 0.97 ) *Unterschiede 𢥲 die Verteilung plotten mat tot8=e(total_difference) mat char8=e(characteristics) mat coef8=e(coefficients) mat quant8=e(quantiles) svmat tot8 svmat char8 svmat coef8 svmat quant8 twoway (line tot81 quant81) (line char81 quant81) (line coef81 quant81), ytitle(Quantile Effect) xtitle("Quantile", size(small)) legend(off) /// ytitle("Log Wage Differential", size(small)) graphr(fcolor(white) lc(white)) scheme(sj) title("Public sector - Male", size(small) ) cd "$tex" graph save cdecopublic_male.gph, replace graph2tex, epsfile (cdecopublic_male) caption(Cdeco all)label(cdecofull_male) restore ****Combine all graphs grc1leg cdecofull_male.gph cdecofull_female.gph cdecowest_male.gph cdecowest_female.gph cdecoeast_male.gph cdecoeast_female.gph cdecopublic_male.gph cdecopublic_female.gph, legendfrom(cdecofull_male.gph) graphr(fcolor(white) lc(white)) c(4) /// note("Source: RDC of the Federal Statistical Office and Statistical Offices of the Länder, Verdienststrukturerhebung, 2010, own calculations.", size(vsmall)) xsize(15) ysize(5) graph save decompositions.gph, replace graph export decompositions.eps, replace