<p>Understanding back-door criterion via Directed Acyclic Graphs (<a href="http://causality.cs.ucla.edu/blog/index.php/category/back-door-criterion/" rel="nofollow noreferrer">http://causality.cs.ucla.edu/blog/index.php/category/back-door-criterion/</a>) helped me understand how to add covariates on my econometric model. While studying the material, I also found a wonderful website that tells which variables to condition on and how to test whether the DAG you draw is correct: <a href="http://www.dagitty.net/dags.html" rel="nofollow noreferrer">http://www.dagitty.net/dags.html</a></p>

CC BY-SA 4.0
2023-02-18T20:49:27.920Z
2023-02-18T20:49:27.920Z
funcard
<p>I am doing a difference-in-difference analysis of an event that affected several states in the US. I am interested to understand the effects of this event on state-level unemployment rates. I have state level data on demographics for several years before and after this event. My question is what covariates should I include if I am estimating equation of the following form:</p>
<p><span class="math-container">$$
\mbox{unempRate}_{jt} = \gamma_j + \alpha_t + \beta D_{jt} + \delta X_{jt} + \epsilon_{jt}
$$</span></p>
<p>where <span class="math-container">$\gamma_j$</span> are state-fixed effects; <span class="math-container">$\alpha_t$</span> are time fixed effects; <span class="math-container">$D_{jt}$</span> are dummies - 1 if state <span class="math-container">$j$</span> is affected at time <span class="math-container">$t$</span>, and 0 otherwise; and <span class="math-container">$X_{jt}$</span> are time-varying state level covariates. Coefficient of interest is <span class="math-container">$\beta$</span>.</p>
<p>So far, I have included population and average household income at the state level.</p>
<p>What more covariates can I include? How does one decide which covariates to include in a setting like this? What is the guiding philosophy?</p>

CC BY-SA 4.0
2023-02-02T23:00:48.543Z
Covariates should be pre-determined
Papayapap
CC BY-SA 4.0
2023-02-03T02:00:34.667Z
@Papayapap, could you clarify with some details? How does one 'pre-determine'?
funcard
CC BY-SA 4.0
2023-02-03T09:05:01.863Z
They should not be affected by the treatment, either measured before or invariant.
Papayapap
CC BY-SA 4.0
2023-02-03T23:48:17.727Z
Average household income could easily be argued to be affected by the treatment under the assumption that the treatment has a non-zero effect on the unemployment rate. However, variables describing the quality of the labour force could be a suggestion. Perhaps, something like average educational level, shares of education groups, degree of urbanization/labour market access variables (area of land per citizens with a road density higher than x ... or something like that). Immigrants can have a hard time achieving full labour market integration so share of certain type of immigrants.
Jesper Hybel
CC BY-SA 4.0
2023-02-03T23:55:13.040Z
@JesperHybel, thanks. What's the general philosophy that guides the choice of a particular covariate? Trying to find a reference on this question, but no luck so far.
funcard
CC BY-SA 4.0
2023-02-04T09:32:21.217Z
To the extent that 'general rules' guiding the choice of variables exists they are contained in the economic literature on the subject matter at hand. This literature is both theoretical and empirical. You are conducting empirical state-level analysis. There is a long tradition of doing and only by reading this literature or reviews (perhaps book length) will you find what you are looking for. As @Papayapap says: You have to establish the predeterminedness of your variables, however, to argue for predeterminedness you would have to use economic theory.
Jesper Hybel
CC BY-SA 4.0
2023-02-04T09:37:04.340Z
See for example this passage from Angrist addressing the estimation of returns to education: 'Although occupation is strongly correlated with both schooling and wages, occupation dummies are bad controls in regressions meant to capture the causal effects of schooling on wages. The fact that Master Joshway works today as a professor and not as a nurse’s aide (as he once did) is in part a reward for his extravagant schooling. It’s a mistake to eliminate this benefit from our calculation by comparing only professors or nurse’s aides when attempting to quantify the economic value of schooling.'
Jesper Hybel
CC BY-SA 4.0
2023-02-04T09:41:01.877Z
If you want to do state-level analysis in a modern diff-in-diff I would recommend you to read something by Alberto Abadie. You can start here: https://economics.mit.edu/sites/default/files/publications/Synthetic%20Control%20Methods.pdf. I'm no saying this will answer your questions but in my opinion this is interesting new methodological research.
Jesper Hybel
CC BY-SA 4.0
2023-02-04T09:46:55.687Z
You may find tutorials and guides on implementation in the literature documenting the software in R. The relevant R packages are called 'synth' and 'tidysynth': Here is something about synth: https://www.jstatsoft.org/article/view/v042i13
Jesper Hybel
CC BY-SA 4.0
2023-02-04T10:10:23.047Z
Personally, I also like this page: https://diff.healthpolicydatascience.org/ and https://www.theeffectbook.net/ch-DifferenceinDifference.html as an introduction but really there is so much methodological literature being written on diff-in-diff. And here's is a page trying to give an overview of the developments in diff-in-diff: https://asjadnaqvi.github.io/DiD/
Jesper Hybel
CC BY-SA 4.0
2023-02-04T23:05:07.017Z
@JesperHybel, thanks for these references.
funcard
<microeconomics><econometrics><reference-request><difference-in-difference>
Which covariates can I include in my fixed-effects regression?
funcard
# Which covariates can I include in my fixed-effects regression?

(Asked by: username_0 on 2023-02-01)

I am doing a difference-in-difference analysis of an event that affected several states in the US. I am interested to understand the effects of this event on state-level unemployment rates. I have state level data on demographics for several years before and after this event. My question is what covariates should I include if I am estimating equation of the following form:

$$
\mbox{unempRate}\_{jt} = \gamma\_j + \alpha\_t + \beta D\_{jt} + \delta X\_{jt} + \epsilon\_{jt}
$$

where $\gamma\_j$ are state-fixed effects; $\alpha\_t$ are time fixed effects; $D\_{jt}$ are dummies - 1 if state $j$ is affected at time $t$, and 0 otherwise; and $X\_{jt}$ are time-varying state level covariates. Coefficient of interest is $\beta$.

So far, I have included population and average household income at the state level.

What more covariates can I include? How does one decide which covariates to include in a setting like this? What is the guiding philosophy?

**Tags:** microeconomics, econometrics, reference-request, difference-in-difference

> **Comments:**
> **username_1**: Covariates should be pre-determined  
> **username_0**: @username_1, could you clarify with some details? How does one 'pre-determine'?  
> **username_1**: They should not be affected by the treatment, either measured before or invariant.  
> **username_2**: Average household income could easily be argued to be affected by the treatment under the assumption that the treatment has a non-zero effect on the unemployment rate. However, variables describing the quality of the labour force could be a suggestion. Perhaps, something like average educational level, shares of education groups, degree of urbanization/labour market access variables (area of land per citizens with a road density higher than x ... or something like that). Immigrants can have a hard time achieving full labour market integration so share of certain type of immigrants.  
> **username_0**: @username_2, thanks. What's the general philosophy that guides the choice of a particular covariate? Trying to find a reference on this question, but no luck so far.  
> **username_2**: To the extent that 'general rules' guiding the choice of variables exists they are contained in the economic literature on the subject matter at hand. This literature is both theoretical and empirical. You are conducting empirical state-level analysis. There is a long tradition of doing and only by reading this literature or reviews (perhaps book length) will you find what you are looking for. As @username_1 says: You have to establish the predeterminedness of your variables, however, to argue for predeterminedness you would have to use economic theory.  
> **username_2**: See for example this passage from Angrist addressing the estimation of returns to education: 'Although occupation is strongly correlated with both schooling and wages, occupation dummies are bad controls in regressions meant to capture the causal effects of schooling on wages. The fact that Master Joshway works today as a professor and not as a nurse’s aide (as he once did) is in part a reward for his extravagant schooling. It’s a mistake to eliminate this benefit from our calculation by comparing only professors or nurse’s aides when attempting to quantify the economic value of schooling.'  
> **username_2**: If you want to do state-level analysis in a modern diff-in-diff I would recommend you to read something by Alberto Abadie. You can start here: https://economics.mit.edu/sites/default/files/publications/Synthetic%20Control%20Methods.pdf. I'm no saying this will answer your questions but in my opinion this is interesting new methodological research.  
> **username_2**: You may find tutorials and guides on implementation in the literature documenting the software in R. The relevant R packages are called 'synth' and 'tidysynth': Here is something about synth: https://www.jstatsoft.org/article/view/v042i13  
> **username_2**: Personally, I also like this page: https://diff.healthpolicydatascience.org/ and https://www.theeffectbook.net/ch-DifferenceinDifference.html as an introduction but really there is so much methodological literature being written on diff-in-diff. And here's is a page trying to give an overview of the developments in diff-in-diff: https://asjadnaqvi.github.io/DiD/  
> **username_0**: @username_2, thanks for these references.  

---

## 1 answers

### Answer by username_0 on 2023-02-18. Score: 0 | Accepted answer

Understanding back-door criterion via Directed Acyclic Graphs (<http://causality.cs.ucla.edu/blog/index.php/category/back-door-criterion/>) helped me understand how to add covariates on my econometric model. While studying the material, I also found a wonderful website that tells which variables to condition on and how to test whether the DAG you draw is correct: <http://www.dagitty.net/dags.html>


---

