Adding Controls to Staggered Difference in Difference Regressions on Stata 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).


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?

No.
The variable activetreatment will work just fine. The variable should 'turn on' (i.e., switch from 0 to 1) in any state and year combination where legalization was active, 0 otherwise. In states where legalization did not occur, activetreatment is 0 in all time periods. We must define treatment in this way, as different states enact legislation in different years. Again, since we have no well-defined period where treatment starts, then the policy variable is just 'switching on' in any state-year observation where the policy is active, 0 otherwise.
Also, you can safely omit treatment as it's collinear with the state fixed effects. You're not really penalized for including a time-constant input variable; software will drop it from the model output.

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?

Assuming it's a continuous, time-varying covariate, then it's permissible to include it. I recommend specifying the salary variable unprefixed.

Also, am I placing the control variable in the right place?

It is specified to the right of your outcome variable like a typical covariate. I found it difficult to parse through your code since it was written in the text of your question, but this should work:
xtset state year
xtreg totrev i.activetreatment totsalariespc i.year, fe cluster(state)

