Hi!
I am running a DiD model with multiple interactions and want to plot them using the margins, dydx() command.
More specifically I am looking into how turnout changes after a payment is introduced in a specific state relative to all other states.
the normal DiD model (without additional interactions) looks like this:
Now I want to display the marginal effect of the treatment (a payment) on turnout at different levels of educational attainment.
To simplify this (and be able to use the margins command) I decided to generate a payment variable which is the interaction of post*treated=payment
Running (A)- i.post##i.treated##c.education and running (B)- i.payment##c.education however leads to different results.
Can someone explain to me why this is the case?
Thank you!
Best
Hannah
I am running a DiD model with multiple interactions and want to plot them using the margins, dydx() command.
More specifically I am looking into how turnout changes after a payment is introduced in a specific state relative to all other states.
the normal DiD model (without additional interactions) looks like this:
Code:
reg y i.post##i.treated i.year i.state education othercontrolvars, vce(cluster state)
Code:
(A) reg y i.post##i.treated##c.education i.year i.state othercontrolvars, vce(cluster state)
Code:
gen payment=post*treated (B) reg y post treatyear i.payment##c.education i.year i.state othercontrolvars, vce(cluster state) margins, dydx(payment) at(education=(0(1)7)) marginsplot
Can someone explain to me why this is the case?
Thank you!
Best
Hannah
Comment