Econometrics II
Department of Economics, WU Vienna
Department of Economics, WU Vienna
In this course, we are going to learn about causality.
Image by Kiran891 (2023)
Remember that in the potential outcomes framework (more precisely: in the Neyman-Rubin Causal Model), the causal effect of a treatment \(X\) on an outcome \(Y\) is (for a binary treatment):
\[ \text{Causal Effect}_i=\textcolor{var(--secondary-color)}{Y_i}(\textcolor{var(--primary-color)}{1})-\textcolor{var(--secondary-color)}{Y_i}(\textcolor{var(--primary-color)}{0}) \]
In reality, only one outcome is realized, the other is counterfactual. We have to estimate this missing outcome to learn about the causal effect.
| i | \(X_i\) | \(Y_i\) | \(Y_i(1)\) | \(Y_i(0)\) |
|---|---|---|---|---|
| 1 | 0 | 1 | ? | 1 |
| 2 | 0 | 1 | ? | 1 |
| 3 | 1 | 1 | 1 | ? |
| 4 | 1 | 0 | 0 | ? |
| … | ||||
| N | 1 | 1 | 1 | ? |
Identification
We say an effect is causally identified if we can interpret it causally in our framework and scope. Can we identify a causal effect of studying and income using data only on the two?
Can we identify a causal effect using the following model?
\[ \text{income}_i = \text{hours studied}_i\:\beta + u_i \]
In addition to the individual causal effect, which we can never find nor estimate, there are the following quantities:
The Average Treatment Effect (ATE) is the mean of all individual treatment effects. \[ \begin{aligned} \mathrm{ATE} = \mathrm{E}(\text{Causal Effect}_i) &= \mathrm{E}(Y_i(1)-Y_i(0))\\ &= \mathrm{E}(Y_i(1))- \mathrm{E}(Y_i(0)). \end{aligned} \]
The Conditional Average Treatment Effect (CATE) is conditional on some third characteristic \(Z_i\): \[ \mathrm{CATE} = \mathrm{E}(\text{Causal Effect}_i| Z_i = z) \]
The Average Treatment Effect on the Treated (ATT) is the treatment effect for only the subset of the population that was treated.
\[ \mathrm{ATT} = \mathrm{E}(\text{Causal Effect}_i| X_i = 1) \]
| \(i\) | \(X_i\) | \(Y_i\) | \(Y_i(1)\) | \(Y_i(0)\) |
|---|---|---|---|---|
| \(1\) | \(0\) | \(1\) | \(-\) | \(1\) |
| \(2\) | \(0\) | \(0\) | \(-\) | \(0\) |
| \(3\) | \(0\) | \(0\) | \(-\) | \(0\) |
| \(4\) | \(0\) | \(0\) | \(-\) | \(0\) |
| \(5\) | \(1\) | \(1\) | \(1\) | \(-\) |
| \(6\) | \(1\) | \(1\) | \(1\) | \(-\) |
| \(7\) | \(1\) | \(1\) | \(1\) | \(-\) |
| \(8\) | \(1\) | \(0\) | \(0\) | \(-\) |
A treatment \(X\) is ignorable if both potential outcomes are independent of \(X\), the treatment: \[ (Y(1),Y(0))\perp\!\!\!\!\perp X \]
\(X\) is ignorable when the treatment is randomly assigned and only affects the outcome \(Y\) by either realizing \(Y(0)\) or \(Y(1)\): \[ Y = Y(1)\times X + Y(0)\times (1-X) \]
Think
When is treatment assignment not ignorable?
A treatment \(X\) is ignorable conditional on covariates \(Z\) if:
That is, potential outcomes are independent of \(X\), conditional on \(Z\), and there are both treated and untreated subjects.
If \(X\) is ignorable, we can use the sample averages \(\mathrm{E}(Y_i(0))\) and \(\mathrm{E}(Y_i(1))\) as estimates for \(Y(0)\) and \(Y(1)\). This means that the estimate of the \(\mathrm{ATE}\) will be causally identified.
We can identify a causal effect if we travel to a different reality and compare realized to counterfactual outcomes,
or we can find a setting in which treatment is ignorable to identify the causal effect, which is much easier to do.
Experiments
How do we get treatment to be ignorable?
Experiments, either natural or designed experiments, are the gold standard. Treatment is truly randomly assigned, and we can identify a causal effect without any fancy econometrics.
Experiments are not always feasible. Thankfully, there are other ways to identify a causal effect (i.e., to ensure ignorability of treatment). We are going to spend much of the semester discussing those.
Think
What can prevent us from conducting an experiment? And even if there is nothing preventing us from doing so, are there reasons not to conduct one?
Even with randomization, imbalance and overlap can threaten causal identification.
When designing an experiment, we can use prior information to get more precise and accurate estimates. Imagine an experiment where we test the efficacy of a medical drug.
We know that age is an important covariate that governs how people respond to a drug, and probably also affects the treated disease directly. To minimize balance and overlap issues, we can run a blocked experiment:
We can calculate an ATE separately for each block. If we are interested in an overall ATE, we can subsequently compute a weighted average of the block-specific ATEs (weighted by the number of observations for each block.).
The Potential Outcomes (PO) framework, which we covered last week, is one way to view causal questions.
The potential outcomes framework relates very clearly to the notion of a randomized experiment.
Today, we are discussing a different framework that has its strengths elsewhere: the Directed Acyclical Graphs (DAG) framework.
To give you an intuition before we start with the theory, a DAG looks like this:
What you see on the right is what we call a graph.
This graph has three nodes. They are labeled \(i\), \(j\), and \(k\). Sometimes, we call the nodes “vertices,” “agents,” “points,” etc.
Some of the nodes in a graph are usually connected to each other, while others are not. We call those connections edges. Alternatively, they can be called “links,” “connections,” “lines,” etc.
Edges are pairs of two nodes. In the second graph, there is one edge from \(i\) to \(j\). We call this edge \(\{i,j\}\).
This edge does not have a direction.
However, we can easily give edges a direction. We call an edge like this a directed edge. When an edge is directed, the corresponding pair of nodes is no longer an unordered pair, but an ordered pair: \(\{j,i\}\neq\{i,j\}\).
A walk is a sequence of edges that joins a sequence of nodes. A cycle is a special case of a walk where all edges are distinct and the initial and final node are equal. In this graph, \(\left\{\{a,b\},\{b,c\},\{c,a\}\right\}\) is a cycle.
A graph that does not contain any cycles is called an acyclic graph.
If a graph contains only directed edges, we call it a directed graph.
The following graph is both directed and acyclic. We therefore call it a
Directed Acyclic Graph (DAG).
Think
Why is \(\{\{A,B\},\{B,C\},\)\(\{C,E\},\{E,A\}\}\) not a cycle?
Why do we talk about DAGs in an Econometrics class? Because they are really useful for causal modeling.
In the following DAG, nodes represent (random) variables, and edges represent (hypothesized) causal effects.
Missing edges also convey information: the assumption of no causal effect.
DAGs are a very useful framework for causal inference because
It turns out that there are two paths from \(X\) to \(Y\),
We call it a backdoor path because it enters \(X\) trough the “back door,” via an arrow pointed at \(X\).
In this DAG, when we want to isolate the effect \(X\rightarrow Y\), there is one open backdoor path.
This path confounds the causal effect of interest. We therefore call the variable \(U\) a confounder.
Confounder
A confounder is a variable that influences both the dependent and the explanatory variables.
If we just look at the connection between \(X\) and \(Y\), two effects are mixed together:
We can close the backdoor by controlling for the confounder. We only run into problems when we cannot control for the confounder.
We would run a regression along the lines of:
\[ \boldsymbol{y} \sim \boldsymbol{x} + \boldsymbol{u}. \]
Now imagine a different situation: There is a third variable, \(V\), that is jointly influenced by \(X\) and \(Y\).
Effects of both variables collide at \(V\). We therefore call \(V\) a collider. There is again one direct path and one backdoor path, but since the backdoor collides at \(V\), it is already closed.
Collider
A collider is a variable that is influenced by both the dependent and the explanatory variables.
Open backdoors between two variables introduce systematic, non-causal correlation between them. If we want to estimate a causal effect, we need to close them. There are three cases we have to consider:
Confounders
We close backdoor paths by controlling for confounders.
Colliders
We can (and need to) leave colliders alone. The backdoor path is already closed.
Mediators
A mediator mediates part of the effect. If we control for the mediator, we remove the mediated effect and leave only the direct effect.
How does this framework look like if we apply it to an example? Let us look at the following graph on the effect of gender (\(F\)) based discrimination (\(X\)) on earnings (\(Y\)).
We account for occupation (\(O\)) and aptitude (\(A\)).
Note that aptitude is not observed.
How many paths from \(X\) to \(Y\) can we enumerate?
How many paths between \(X\) and \(Y\) can we enumerate?
Which models can we use to isolate the effect of interest?
Without \(A\), we cannot isolate the causal effect of \(X\) on \(Y\) in this model. DAGs can highlight what cannot be done.
How come?
How is this possible?
| No Drug | Took Drug | |||
|---|---|---|---|---|
| Heart Attack | No Heart Attack | Heart Attack | No Heart Attack | |
| Female | 1 | 19 | 3 | 37 |
| Male | 12 | 28 | 8 | 12 |
| Total | 13 | 47 | 11 | 49 |
How does this “Bad-Bad-Good (BBG)” drug paradox arise?
| No Drug | Took Drug | |||
|---|---|---|---|---|
| Heart Attack | No Heart Attack | Heart Attack | No Heart Attack | |
| Female | 1 | 19 | 3 | 37 |
| Male | 12 | 28 | 8 | 12 |
| Total | 13 | 47 | 11 | 49 |