Control variables- Difference in Difference I am carrying out a difference in difference estimation. Regarding control variables addition I am kinda confused. Am I to add control variables which affect the dependent variable or control variables which affect the dependent variable but would not affect the policy effect on the dependent variable.
 A: There are two reasons for including covariates in a difference in differences regression:


*

*for identification of the treatment effect;

*to reduce the error variance (i.e. increase power of statistical tests).


Suppose you want to know the effect of a job market program on employment in a city where this program was randomly assigned to unemployed individuals. You regress
$$Y_{igt} = \gamma_g + \lambda_t + \beta J_{gt} + \epsilon_{igt},$$
where $Y$ is the outcome (0 = unemployed, 1 = employed), $J$ is the dummy which equals one for the treated in the treatment period, $i$, indexes individuals, $g$ indexes groups (1 = treatment group, 0 = control group), $t$ indexes time periods (1 = post-treatment, 0 = pre-treatment), $\gamma$ and $\lambda$ are group and period fixed effects, and $\epsilon$ is a stochastic error term.
This is equivalent to the regression
$$Y_{igt} = \alpha + \beta_1 \text{treat}_i + \beta_2 \text{post}_t + \beta_3 \text{(treat$\cdot$ post)}_{it} + \epsilon_{it},$$
where you indicate treatment and control group, and the pre- and post-treatment periods with two dummies that are then interacted. This is probably the difference in difference regression you have seen in a textbook or class notes.
Suppose in the two periods the GDP in our city increases. Then the outcome is affected by another time-varying factor which has nothing to do with the job market program but it occurs at the same time. This violates the common trend assumption. In order to not overstate $\beta$ in the first regression, you would want to include GDP as a control in the regression which separates out this additional effect on the outcome which is not due to the job market program. This is the case of including a covariate for identification when you regress
$$Y_{igt} = \gamma_g + \lambda_t + \beta J_{gt} + \delta \text{GDP}_t + \epsilon_{igt}.$$
Only information at the group level (treatment-control) is required for identification of your treatment effect. If you have additional information on your individuals, for instance their age, you can include this in the regression as well, as follows:
$$Y_{igt} = \gamma_g + \lambda_t + \beta J_{gt} + \delta \text{GDP}_t + \theta \text{age}_{igt} + \epsilon_{igt}.$$
The within-group variation in age does not matter for identification (for a detailed explanation see the notes here) but they can help to reduce the error variance of the regression. In this case your statistical tests will have more power and it will be easier to determine whether $\beta$ has a significant effect or not.
