Hi guys,

I’m running regressions using the reghdfe command, and I want to plot the coefficients. 2007 is the intervention year. My codes are as below:
reghdfe `X' i.treatment_adj##ib(2007).year, absorb( global_id year) vce(cluster global_id)

coefplot, vertical drop(_cons) keep(1.treatment_adj*) yline(0) rename(^.*([0-9]+)([0-9]+)([0-9]+)([0-9]+).*$ = \1\2\3\4, regex) title("`X'_2000data_2007b_sample1_FE")

In the coefficient plots, I want to include a vertical line of the intervention year (2007). I know the code for doing this is “xline”, but I had troubles in incorporating the xline code together with the coefficient plot code. When I add xline(2007), the vertical line is not drawn correctly in 2007 location

coefplot, vertical drop(_cons) keep(1.treatment_adj*) yline(0) rename(^.*([0-9]+)([0-9]+)([0-9]+)([0-9]+).*$ = \1\2\3\4, regex) title("`X'_2000data_2007b_sample1_FE")

Do you know how to fix it?

Thank you in advance.
Hut98