Hi there,
I am running a staggered diff-in-diff model, looking at legalization's effect on various variables. For context, only a percentage of all states have legalized, and the year they legalized differs across those states, hence the staggered approach. I am looking at the treatment (legalization)'s effect on variables (in this case, TotRev).
I've seen other threads suggest the construction of a 'treatment' dummy which is switched on for all years for states which legalized (no matter the year they legalize), as well as an 'active treatment' dummy which is switched on only for the years and states in which legalization is active (and off for all else, including legalized states pre-legalization).
At the moment, I have this line of code to perform my DiD regression:
xtreg TotRev i.treatment i.activetreatment i.Year, fe cluster(States)
I am wondering if this is fine, or do I need to interact i.treatment and i.activetreatment, so that it forms i.treatment#i.activetreatment?
If I don't need the interaction between the two, am I alright to drop the i.treament variable, since it doesn't really serve a purpose (I'm just concerned with the active treatment's effect on TotRev).
I was also confused about adding control variables. Say i wanted to control for salary per capita, would I add the variable as TotSalariespc or i.TotSalariespc - like so:
xtreg TotRev i.treatment i.activetreatment TotSalariespc i.Year, fe cluster(States) or xtreg TotRev i.treatment i.activetreatment i.TotSalariespc i.Year, fe cluster(States)
Also, am i placing the control variable in the right place?
Let me know if you need any more information, thank you!
I am running a staggered diff-in-diff model, looking at legalization's effect on various variables. For context, only a percentage of all states have legalized, and the year they legalized differs across those states, hence the staggered approach. I am looking at the treatment (legalization)'s effect on variables (in this case, TotRev).
I've seen other threads suggest the construction of a 'treatment' dummy which is switched on for all years for states which legalized (no matter the year they legalize), as well as an 'active treatment' dummy which is switched on only for the years and states in which legalization is active (and off for all else, including legalized states pre-legalization).
At the moment, I have this line of code to perform my DiD regression:
xtreg TotRev i.treatment i.activetreatment i.Year, fe cluster(States)
I am wondering if this is fine, or do I need to interact i.treatment and i.activetreatment, so that it forms i.treatment#i.activetreatment?
If I don't need the interaction between the two, am I alright to drop the i.treament variable, since it doesn't really serve a purpose (I'm just concerned with the active treatment's effect on TotRev).
I was also confused about adding control variables. Say i wanted to control for salary per capita, would I add the variable as TotSalariespc or i.TotSalariespc - like so:
xtreg TotRev i.treatment i.activetreatment TotSalariespc i.Year, fe cluster(States) or xtreg TotRev i.treatment i.activetreatment i.TotSalariespc i.Year, fe cluster(States)
Also, am i placing the control variable in the right place?
Let me know if you need any more information, thank you!
