Hi all,
I deeply need everyone's help as I am inputting this graph into my thesis!
Below is my sample code:
Based on the above code, my graph depicts two trends with the y-axis as the year-quarter (i.e., the variable date_q) and x-axis as the coefficient value. However, now I am requested to swap the x-axis and y-axis so that the trends in the graph are more readable to the public. It does not have to show all the date_q, so it can be 2017q4, 2018q4, 2019q4, etc., marking every four quarters. Is there any way that I can do with this coefplot since it can store my regression results? Or else, I welcome any other kinds of stata methods so long as it can achieve my task.
I sincerely appreciate your assistance, as it is in a hurry! Thank you!
I deeply need everyone's help as I am inputting this graph into my thesis!
Below is my sample code:
Code:
xtset household date_q preserve keep if income == 0 reghdfe household_emotion i.date_q#c.treat, absorb(i.county#i.date_q) vce(cluster household) estimates store D restore preserve keep if income == 1 reghdfe household_emotion i.date_q#c.treat, absorb(i.county#i.date_q) vce(cluster household) estimates store E restore coefplot(D, label(<100k USD) pstyle(p3)) /// (E, label(>=100k USD) pstyle(p4)), keep(*.date_q#c.treat) /// rename(#c.treat = \1, regex) /// coeflabels(, labsize(tiny)) /// drop(_cons) yline(39) ttext(-4500 5 "-1", size(2)) level(95) /// xtitle("coefficients") ytitle("2017q1-2020q4_income") graphregion(color(white)) bgcolor(white)
I sincerely appreciate your assistance, as it is in a hurry! Thank you!
Comment