Hey all. I have a question regarding coefplot. I am running a panel regression xtreg with a set of country fixed-effects, time fixed-effects as well as a set of election-event-dummies. Policy is a measure for the harshness of the implemented policies, here school closures. Election-event dummies are named election_term_minus_67 ... election_term ... election_term_plus_13 taking the value 1 if the month corresponds the respective month in the electoral cycle, i.e. like this for every country.
...
...
March // Policy-value // no election // election_term_minus_1 = 1 // election_term = 0 // election_term_plus_1 = 0 // n_month_election_term= -1
April // Policy-value // election // election_term_minus_0 = 1 // election_term = 1 // election_term_plus_1 = 0 / / n_month_election_term=0
Mai // Policy-value // no election // election_term_minus_1 = 0 // election_term = 0 // election_term_plus_1 = 1 // n_month_election_term=1
...
...
I run:
What I get is this (see below). However, I would prefer having only a bunch of variables on the axis so that numbers are bigger, e.g. all 6 months.
I've tried other methods such as xlabel(-67(6)13) but then it only begins to plot the coefficients from the start of the positive values while all negative numbers are blank.
I initially also just wanted to do regular dummies with the variable that contains the distance to the next election, i.e. i.n_month_election_term but this is not possible as factor variables must not be negative, so I created dummies by myself and labeled them accordingly with the number only.
Many thanks for any comment on this xD

...
...
March // Policy-value // no election // election_term_minus_1 = 1 // election_term = 0 // election_term_plus_1 = 0 // n_month_election_term= -1
April // Policy-value // election // election_term_minus_0 = 1 // election_term = 1 // election_term_plus_1 = 0 / / n_month_election_term=0
Mai // Policy-value // no election // election_term_minus_1 = 0 // election_term = 0 // election_term_plus_1 = 1 // n_month_election_term=1
...
...
I run:
Code:
eststo school: xtreg policy election_term_* i.country_id i.month_number coefplot (school, keep(election_term_*)), vertical yline(0, lpattern(_) lcolor(red)) msymbol(O) mlcolor(gs11) mfcolor(gs11) ciopts(recast(rcap) lcolor(gs11)) title("Election effect over time") legend(off) nooffsets coeflabels(, labsize(tiny) alternate)
What I get is this (see below). However, I would prefer having only a bunch of variables on the axis so that numbers are bigger, e.g. all 6 months.
I've tried other methods such as xlabel(-67(6)13) but then it only begins to plot the coefficients from the start of the positive values while all negative numbers are blank.
I initially also just wanted to do regular dummies with the variable that contains the distance to the next election, i.e. i.n_month_election_term but this is not possible as factor variables must not be negative, so I created dummies by myself and labeled them accordingly with the number only.
Many thanks for any comment on this xD
Comment