Hello!
Im posting this because i need help with 2 things:
1. I need to add a red yline() That takes the value of 0 from, -12 to 0 (x axsis). And then From 1 to 12, takes another value, for example lets say -0.04, that is the result form a regression coefficient (like a reference point on this graph)
2. Wondering if i can add "shadow" soft gray, for the Confidence Interval of this reference point.
**On the Photo is what I would like to graph.
Im using STATA /SE 18.0
Here de DATA: https://drive.google.com/file/d/1oGz...ew?usp=sharing
And here is the code:
#delimit ;
graph twoway (rcap max95 min95 EventYear, mcolor(black) lcolor(black) lpattern(solid))
(scatter estimate EventYear, mcolor(black) lcolor(black) lpattern(solid) m(d) ),
graphregion(fcolor(white) lcolor(white) lwidth(vvvthin) ifcolor(white) ilcolor(white) ilwidth(vvvthin))
title( "{stSerif:{bf:Figure 1. {it:Event Study: `var'}}}", color(black) size(large))
xtitle("{stSerif:Meses Desde el Derecto de Ley Migración}") xscale(titlegap(2))
xline(0, lcolor(black) lpattern(dash)) legend(off)
yline(0, lcolor(black) lpattern(dash))
(rcap max95 min95 -0.01, mcolor(black) lcolor(black) lpattern(solid))
xlabel(#17,valuelabel nogrid)
(rcap)
note("{stSerif:{it:Notes}. OLS coefficient estimates (and their 95% confidence intervals) are reported.}"
"{stSerif: The controls include state and year fixed effects and the data cover the period from March 2021 to March 2023.}", margin(small)) ;
#delimit cr
** On the this Photo, is what I have now:

Thanks!
Im posting this because i need help with 2 things:
1. I need to add a red yline() That takes the value of 0 from, -12 to 0 (x axsis). And then From 1 to 12, takes another value, for example lets say -0.04, that is the result form a regression coefficient (like a reference point on this graph)
2. Wondering if i can add "shadow" soft gray, for the Confidence Interval of this reference point.
**On the Photo is what I would like to graph.
Im using STATA /SE 18.0
Here de DATA: https://drive.google.com/file/d/1oGz...ew?usp=sharing
And here is the code:
#delimit ;
graph twoway (rcap max95 min95 EventYear, mcolor(black) lcolor(black) lpattern(solid))
(scatter estimate EventYear, mcolor(black) lcolor(black) lpattern(solid) m(d) ),
graphregion(fcolor(white) lcolor(white) lwidth(vvvthin) ifcolor(white) ilcolor(white) ilwidth(vvvthin))
title( "{stSerif:{bf:Figure 1. {it:Event Study: `var'}}}", color(black) size(large))
xtitle("{stSerif:Meses Desde el Derecto de Ley Migración}") xscale(titlegap(2))
xline(0, lcolor(black) lpattern(dash)) legend(off)
yline(0, lcolor(black) lpattern(dash))
(rcap max95 min95 -0.01, mcolor(black) lcolor(black) lpattern(solid))
xlabel(#17,valuelabel nogrid)
(rcap)
note("{stSerif:{it:Notes}. OLS coefficient estimates (and their 95% confidence intervals) are reported.}"
"{stSerif: The controls include state and year fixed effects and the data cover the period from March 2021 to March 2023.}", margin(small)) ;
#delimit cr
** On the this Photo, is what I have now:
Thanks!
Comment