Hi,
I have a repeated cross section of households in districts during t= 1/13, outcome variable y, and a policy introduced in t=7 in policy districts.
I estimate the following regression:
coefficient of t#policydist is of interest and I want to plot these coefficients against t
I use the following code
Q.1: I'm new to this and not quite sure if this code is actually plotting the coefficient of interaction term against t, so it would be great if someone could clarify that.
Q2.: this does not show the base year in the plot (although i include base option) and instead the xline starts from t=1. Any suggestion on how to show the base year would be greatly appreciated.
Attached is the graph produced.
I have a repeated cross section of households in districts during t= 1/13, outcome variable y, and a policy introduced in t=7 in policy districts.
I estimate the following regression:
Code:
reg y ib7.t##i.policydist i.district, robust
I use the following code
Code:
coefplot ., keep(*.t#1.policydist) vertical base mcolor("106 208 200") ciopts(lcolor("118 152 160")) ytitle(Coefficient) /// rename(1.t#1.policydist="-6" 2.t#1.policydist="-5" 3.t#1.policydist="-4" 4.t#1.policydist="-3" 5.t#1.policydist="-2" 6.t#1.policydist="-1" 7.t#1.policydist="0" 8.t#1.policydist="1" 9.t#1.policydist="2" 10.t#1.policydist="3" 11.t#1.policydist="4" 12.t#1.policydist="5" 13.t#1.policydist="6") /// yline(0,lcolor("106 208 200") lpattern(dash)) xline(7, lcolor("236 196 77")) /// graphregion(fcolor(white) ifcolor(white) ilcolor(white)) /// xscale(lcolor("0 51 102")) yscale(lcolor("0 51 102")) /// xlabel(, labcolor("0 51 102") noticks) ylabel(, labcolor("0 51 102") noticks nogrid) /// title(Coefplot (Event Study) Graph, color("0 51 102"))
Q2.: this does not show the base year in the plot (although i include base option) and instead the xline starts from t=1. Any suggestion on how to show the base year would be greatly appreciated.
Attached is the graph produced.