# difference-in-differences with fixed effects

I have two questions related to having fixed effects in the DD model.

I have a treatment that occurs at different times (e.g., 2001,2005, etc.). I want to fit a DD model, so I standardize the treatment years to year "0" as the the treatment time. To control for treatment year heterogeneity, I included the true year fixed effects.

$y_{it} = \beta_0 + \beta_1 \text{Treat} + \beta_2 \text{After} + \beta_3 (\text{Treat$\cdot$After}) + \eta (\text{Year Fixed Effects})+ \gamma C_{it} + \epsilon_{it}$

Question 1: Is there anything wrong with this model?

Question 2: Is there an issue to including time-constant fixed effects to this DD model? For example, what if I include i-level fixed effects ($\alpha_i$) and/or group indictors of i fixed effects (e.g. male/female or race)? I realize that DD cancels out time-constant i-lvl FE, but what if I include it here again?

The model is fine but instead of standardizing the treatment years there is an easier way to incorporate different treatment times in difference in differences (DiD) models which would be to regress, $$y_{it} = \beta_0 + \beta_1 \text{treat}_i + \sum^T_{t=2} \beta_t \text{year}_t + \delta \text{policy}_{it} + \gamma C_{it} + \epsilon_{it}$$ where $\text{treat}$ is a dummy for being in the treatment group, $\text{policy}$ is a dummy for each individual that equals 1 if the individual is in the treatment group after the policy intervention/treatment, $C$ are individual characteristics and $\text{year}$ are a full set of year dummies. This is a different version of the DiD model that you stated above but it does not require standardization of treatment years as it allows for multiple treatment periods (for an explanation see page 8/9 in these slides).
With regards to the second question you can include time-invariant variables at the individual level. You cannot add them at the group level (treatment vs control) because these will be absorbed by the $\text{treat}$ dummy. You can still include individual control variables like gender but note that they do not play a mayor role in DiD analyses. Their only benefit is that they may reduce the residual variance and hence increase the power of your statistical tests (see slide 8 here).
• You need panel data for difference in differences because you require a pre- and post-treatment period. The treatment effect is $\delta$, the implicit assumption is that the treatment effect is constant over time but this can be relaxed if needed. – Andy Aug 13 '14 at 14:35