class: center, middle, inverse, title-slide #
PPOL561 | Accelerated Statistics for Public Policy II
Week 3
Introduction to Causal Inference
###
Prof. Eric Dunford ◆ Georgetown University ◆ McCourt School of Public Policy ◆
eric.dunford@georgetown.edu
--- layout: true <div class="slide-footer"><span> PPOL561 | Accelerated Statistics for Public Policy II           Week 3 <!-- Week of the Footer Here -->              Introduction to Causal Inference <!-- Title of the lecture here --> </span></div> --- class: outline # Outline for Today ![:space 1] - **Causal Inference** ![:space 3] - **Structural Causal Models** + **_DAGs_** + **_Interventions_** and **_Adjustments_** ![:space 3] - **Causal Discovery** ![:space 3] - **Potential Outcomes** --- class: newsection # Causal Inference --- ## Inference ![:space 2] We're interested in two types of inference: ![:space 2] - **Descriptive Inference**: seeks to describe the existence of something or some process. ![:space 2] - **Causal Inference**: seeks to understand the effect of one variable on the other. ![:space 3] The aim is to use information retrieved from a **_sample_** to make inferences about the state of the world _outside_ the sample (i.e. generalize to the population). --- ### Causal Effects ![:space 1] - A **_causal effect_** is the difference between what happens to a unit after it received some treatment and what would have happened given it never received the treatment. ![:space 2] - A causal effect is a **_theoretical quantity_** defined independently of any empirical method that might be used to estimate it from real data. ![:space 3] - Through a clear research design and modeling strategy we aim to **_infer_** the causal relationship between treatment and outcome. ![:space 3] - **_Identifying the causal process is separate from the parametric models_** that we use to estimate a causal effect. --- ### Frameworks for identifying causal effects We'll explore two prominent frameworks used in the causal inference literature. - **Structural Causal Models** (DAGs) - Champion(s): _Judea Pearl_ (Computer Science) - Applications to Artificial Intelligence - Useful when thinking about the causal structure (causal mechanism) and when attempting to isolate causal effects from observational data. - **_Potential Outcomes_** - Champion(s): _Guido Imbens_ (Economics) & _Donald Rubin_ (Statistics) - Applications to the social sciences. - Useful when thinking about treatment (interventions) and random assignment mechanisms (experiments, quasi-experiments) --- class: newsection # Structural Causal Models --- ## Directed Acyclical Graphs (DAGs) - A DAG is a way of **_modeling a causal effect using graphs_**. The DAG represents these causal effects through a set of **_nodes_** and **_arrows_** (directed edges) - **_nodes_** represent random variables. - **_edges_** represent a _causal effect_. - The direction of the arrow captures **_cause_** and **_effect_** <img src="week-03-causal-inference-ppol561_files/figure-html/unnamed-chunk-1-1.png" style="display: block; margin: auto;" /> --- ## Where do DAGs come from? ![:space 2] - **_DAGs are generated from_**: - domain expertise; - theory and existing models; - intuition and/or common knowledge; - data (more on this later). - **_DAGs are useful for_**: - Causal identification using observable data; - Developing research designs; - Matching theoretical arguments to empirical modeling strategy. - Ultimately, DAGs are models of how we think the **_world works_**. --- ![:space 5] A causal effect can either be **_direct_**. <img src="week-03-causal-inference-ppol561_files/figure-html/unnamed-chunk-2-1.png" style="display: block; margin: auto;" /> Or a causal effect can be **_mediated_** by a third variable. <img src="week-03-causal-inference-ppol561_files/figure-html/unnamed-chunk-3-1.png" style="display: block; margin: auto;" /> --- ![:space 5] We denote dependencies due to an **_omitted common cause_** using dashed edges. Edges can be expressed either as bidirectional edge or as a greyed out node. <img src="week-03-causal-inference-ppol561_files/figure-html/unnamed-chunk-4-1.png" style="display: block; margin: auto;" /> --- We use **_kinship terminology_** when referencing relationships between nodes. <img src="week-03-causal-inference-ppol561_files/figure-html/unnamed-chunk-5-1.png" style="display: block; margin: auto;" /> --- ![:space 3] <img src="week-03-causal-inference-ppol561_files/figure-html/unnamed-chunk-6-1.png" style="display: block; margin: auto;" /> --- ![:space 3] <img src="week-03-causal-inference-ppol561_files/figure-html/unnamed-chunk-7-1.png" style="display: block; margin: auto;" /> --- A **_path_** is a sequence of edges that connect two variables (vertices). - A path can go either along or against the direction of the edges. (e.g. below are the paths from P to Y in the previous graph) <img src="week-03-causal-inference-ppol561_files/figure-html/unnamed-chunk-8-1.png" style="display: block; margin: auto;" /> --- ![:space 3] - Causal relationships in a DAG are **_asymmetric_** + If "X causes B" is true, then "B causes X" must be false. - There are **_no cycles_**, **_feedback loops_**, or **_simultaneous effects_** in a DAG. - But concepts like **_reverse causality_** can be modeled using time indices. <img src="week-03-causal-inference-ppol561_files/figure-html/unnamed-chunk-9-1.png" style="display: block; margin: auto;" /> --- - The aim of a DAG is to represent some underlying **_structural causal model_**. - The framework is fully **_non-parametric_**, meaning the structural model makes no functional form assumptions. - `\(f_i()\)` represents any arbitrary function, and `\(\epsilon_i\)` represents disturbances. .pull-left[ <img src="week-03-causal-inference-ppol561_files/figure-html/unnamed-chunk-10-1.png" style="display: block; margin: auto;" /> ] .pull-right[ <br> - `\(Z = f_1(\epsilon_1)\)` - `\(X = f_2(Z,\epsilon_2)\)` - `\(Y = f_3(Z,X,\epsilon_3)\)` ] --- ![:space 7] A DAG is meant to be a **_complete description_** of all causal relationships of some phenomena. ![:space 1] The graph holds information on **_conditional independence relationships_**. Conditional independence can be inferred from the topology of the graph. ![:space 1] There are three topological structures in a DAG to pay attention to when examining for conditional independence: - **_Chains_** - **_Forks_** - **_Colliders_** --- ![:space 10] **Chains** `\(X\)` becomes independent of `\(Y\)` conditioning on (controlling for) `\(Z\)` (the mediating variable) ![:space 10] <img src="week-03-causal-inference-ppol561_files/figure-html/unnamed-chunk-11-1.png" style="display: block; margin: auto;" /> --- ![:space 10] **Forks** X and Y are dependent, but becomes independent when conditioning on (controlling for) `\(Z\)`. <img src="week-03-causal-inference-ppol561_files/figure-html/unnamed-chunk-12-1.png" style="display: block; margin: auto;" /> --- ![:space 10] **Colliders** If `\(Z\)` is a collider, `\(X\)` and `\(Y\)` are unconditionally _independent_. However, if we condition on `\(Z\)`, `\(X\)` and `\(Y\)` become dependent. That is, conditioning on a collider opens a pathway between `\(X\)` and `\(Y\)`. <img src="week-03-causal-inference-ppol561_files/figure-html/unnamed-chunk-13-1.png" style="display: block; margin: auto;" /> --- ![:space 10] **Colliders** If `\(Z\)` is a collider, `\(X\)` and `\(Y\)` are unconditionally _independent_. However, if we condition on `\(Z\)`, `\(X\)` and `\(Y\)` become dependent. That is, conditioning on a collider opens a pathway between `\(X\)` and `\(Y\)`. <img src="week-03-causal-inference-ppol561_files/figure-html/unnamed-chunk-14-1.png" style="display: block; margin: auto;" /> --- **_Collider bias_** can be due to _selection issues_ (e.g. talent and beauty example from the reading) and/or conditioning on post-treatment variables. DAGs offer us a way to examine if throwing in a specific control variable into a model might _make matters worse_. -- <img src="week-03-causal-inference-ppol561_files/figure-html/unnamed-chunk-15-1.png" style="display: block; margin: auto;" /> --- **_Collider bias_** can be due to _selection issues_ (e.g. talent and beauty example from the reading) and/or conditioning on post-treatment variables. DAGs offer us a way to examine if throwing in a specific control variable into a model might _make matters worse_. <img src="week-03-causal-inference-ppol561_files/figure-html/unnamed-chunk-16-1.png" style="display: block; margin: auto;" /> --- ![:space 5] Finally, note that **_collider bias_** can occur even one controls on a **_collider's descendant!_** <img src="week-03-causal-inference-ppol561_files/figure-html/unnamed-chunk-17-1.png" style="display: block; margin: auto;" /> --- ![:space 5] Finally, note that **_collider bias_** can occur even one controls on a **_collider's descendant!_** <img src="week-03-causal-inference-ppol561_files/figure-html/unnamed-chunk-18-1.png" style="display: block; margin: auto;" /> --- ## D-Separation We say that two variables (nodes) are "d-separated" if _every_ path between them is blocked. <img src="week-03-causal-inference-ppol561_files/figure-html/unnamed-chunk-19-1.png" style="display: block; margin: auto;" /> --- ## D-Separation We say that two variables (nodes) are "d-separated" if _every_ path between them is blocked. <img src="week-03-causal-inference-ppol561_files/figure-html/unnamed-chunk-20-1.png" style="display: block; margin: auto;" /> --- ## Interventions ![:space 5] Most questions we ask in economics, public policy, and political science are concerned with specific **_interventions_** that one can impose to alter the status quo. -- ![:space 3] For DAGs, interventions are formalize through the **"_do_-operator"**. - If we do this, say set `\(X= x\)`, where `\(x\)` is a specific value in the possible range of `\(x\)`, how will the probability distribution of `\(Y\)` (our outcome) change. - Formally, `$$P(Y | do(X = x))$$` --- ## Interventions ![:space 5] Most questions we ask in economics, public policy, and political science are concerned with specific **_interventions_** that one can impose to alter the status quo. ![:space 3] - `\(Pr\)`(Recurrence of Civil War | do(Peace Keepers)) - `\(Pr\)`(Water Quality | do(Environmental Laws)) - `\(Pr\)`(Wage | do(Masters Degree)) - `\(Pr\)`(Democracy | do(Support Opposition)) --- ## Interventions ![:space 10] .pull-left[ <img src="week-03-causal-inference-ppol561_files/figure-html/unnamed-chunk-21-1.png" style="display: block; margin: auto;" /> ] .pull-right[ <br><br> - `\(Z = f_1(\epsilon_1)\)` - `\(X = f_2(Z,\epsilon_2)\)` - `\(Y = f_3(Z,X,\epsilon_3)\)` ] --- ## Interventions ![:space 10] .pull-left[ <img src="week-03-causal-inference-ppol561_files/figure-html/unnamed-chunk-22-1.png" style="display: block; margin: auto;" /> ] .pull-right[ <br><br> - `\(Z = f_1(\epsilon_1)\)` - `\(X = x\)` - `\(Y = f_3(Z,X,\epsilon_3)\)` ] --- ## Interventions - **_We cannot always carry out the types of interventions we'd like to_**. - Ethics - Expense - Practicality -- - In the DAGs framework, we can exploit the structure of the DAG to satisfy particular criteria to make **_identification of a causal quantity possible given observational data_**. - Specifically, there are **_two criteria_** (or adjustments) that make identification from empirical data possible. - **_Backdoor Criteria_** - **_Frontdoor Criteria_** --- ## Backdoor Adjustment A set of variables is said to satisfy the backdoor criterion relative to the treatment and outcome variables if that set of variables _blocks every path_ (d-separates) between the treatment and outcome variable. <img src="week-03-causal-inference-ppol561_files/figure-html/unnamed-chunk-23-1.png" style="display: block; margin: auto;" /> --- ## Backdoor Adjustment <img src="week-03-causal-inference-ppol561_files/figure-html/unnamed-chunk-24-1.png" style="display: block; margin: auto;" /> --- ## Backdoor Criteria ![:space 1] Things to note: - It's necessary to condition on all variables, the Backdoor Criteria offers us the tools to find a **_minimal subset_** of control variables. - Using all variables in your data as controls (i.e., a "kitchen sink" model) can lead to **_spurious correlations_** (via collider bias). - Identifying the variables necessary to satisfy the Backdoor Criteria can **_ease data collection_** efforts. - Save **_degrees of freedom_** when modeling. - Once we have a backdoor admissible adjustment, we can **_apply any conventional estimator_** to estimate the causal quantity. --- ## Frontdoor Adjustment This strategy doesn't rely on closing all backdoor connections. Rather, it relies on the existence of **_intermediate variables_** that lie on the causal path from `\(X\)` leading to `\(Y\)`. ![:space 5] <img src="week-03-causal-inference-ppol561_files/figure-html/unnamed-chunk-25-1.png" style="display: block; margin: auto;" /> --- ## Frontdoor Adjustment A set of variables is said to satisfy the frontdoor criterion if 1. `\(Z\)` intercepts all directed paths from `\(X\)` to `\(Y\)` 2. There is no unblocked path from `\(X\)` to `\(Z\)` 3. All backdoor paths from `\(Z\)` to `\(Y\)` are blocked by `\(X\)` <img src="week-03-causal-inference-ppol561_files/figure-html/unnamed-chunk-26-1.png" style="display: block; margin: auto;" /> --- ## Frontdoor Adjustment We essentially find the effect of `\(X \rightarrow Z\)` and multiply it with the effect of `\(Z \rightarrow Y\)`, yielding the indirect effect of `\(X\)` on `\(Y\)` (mediated by `\(Z\)`) ![:space 5] <img src="week-03-causal-inference-ppol561_files/figure-html/unnamed-chunk-27-1.png" style="display: block; margin: auto;" /> --- ## Frontdoor Adjustment The criterion is violated if `\(X\)` fails to block all paths to `\(Z\)` ![:space 6] <img src="week-03-causal-inference-ppol561_files/figure-html/unnamed-chunk-28-1.png" style="display: block; margin: auto;" /> --- ## Frontdoor Criterion - **_Lack of applied examples_** - Only used in "toy models" - Lacks substantive examples of when it worked as a valid identification strategy. - Just because it hasn't been done, doesn't mean it can't ever be done. - **_Difficult to satisfy assumptions_** - Hard sell →"Moreover, an unobserved variable U affecting both X and Y must have no direct effect on Z. Situations where this could be assumed with any confidence seem likely to be exceptional.” (Cox and Wermuth, 1995, p. 689). --- ### Example (1): College Educ. on Earnings Potential ![:space 3] <img src="week-03-causal-inference-ppol561_files/figure-html/unnamed-chunk-29-1.png" style="display: block; margin: auto;" /> --- ### Example (1): College Educ. on Earnings Potential ![:space 3] <img src="week-03-causal-inference-ppol561_files/figure-html/unnamed-chunk-30-1.png" style="display: block; margin: auto;" /> --- ### Example (1): College Educ. on Earnings Potential ![:space 3] <img src="week-03-causal-inference-ppol561_files/figure-html/unnamed-chunk-31-1.png" style="display: block; margin: auto;" /> --- ### Example (2): Climate and Conflict <img src="week-03-causal-inference-ppol561_files/figure-html/unnamed-chunk-32-1.png" style="display: block; margin: auto;" /> --- ### Example (2): Climate and Conflict <img src="week-03-causal-inference-ppol561_files/figure-html/unnamed-chunk-33-1.png" style="display: block; margin: auto;" /> --- ### Example (2): Climate and Conflict <img src="week-03-causal-inference-ppol561_files/figure-html/unnamed-chunk-34-1.png" style="display: block; margin: auto;" /> --- class: newsection # Causal Discovery --- ## Causal Discovery - A DAG gives rise to **_testable implications_** based on the d-separation relations implied by the model. -- - Remember different type of paths capture different forms of conditional independence (i.e. d-separation relations) that can be detected empirically. - **_Chain_**: `\(X \rightarrow Z \rightarrow Y\)` captures `\(X \perp\!\!\!\!\perp Y | Z\)` - **_Fork_**: `\(X \leftarrow Z \rightarrow Y\)` captures `\(X \perp\!\!\!\!\perp Y | Z\)` - **_Collider_**: `\(X \rightarrow Z \leftarrow Y\)` captures `\(X \perp\!\!\!\!\perp Y\)` -- - If the data are _not compatible_ with the implied relations in the DAG, then the **_graph is a poor representation of the data_** and we can discard it and build a new one. --- ## Causal Discovery .pull-left[ <br> <img src="week-03-causal-inference-ppol561_files/figure-html/unnamed-chunk-35-1.png" style="display: block; margin: auto;" /> ] .pull-right[ The graph implies the following conditional independence relationships - `\(Y \perp\!\!\!\!\perp X | U, Z\)` - `\(Z \perp\!\!\!\!\perp U\)` - `\(P \perp\!\!\!\!\perp U\)` - `\(Y \perp\!\!\!\!\perp P | Z\)` - `\(X \perp\!\!\!\!\perp P | Z\)` ] ![:space 10] Using these rules we can **_empirically distinguish_** colliders from chains and forks (but not chains from forks). --- ## Causal Discovery - **_Causal discovery algorithms_** use the conditional in dependencies observed in the data to construct a DAG. - We can learn the **_underlying DAG_** that best represents the data up to some **_"equivalence class"_**. -- - **_Assumptions_** we need to make for these algorithms to work: - **_Acyclicty_**: the underlying model is acyclic. - Causal **_Sufficiency_**: There are no hidden/latent variables. - Causal **_Faithfulness_**: D-separation reveals conditional independence relationship - **_Linearity_** and Gaussian errors --- ## PC Algorithm Aims to _infer the causal structure compatible with the data_ (given assumptions). Algorithm plays out in **_three steps_**: 1. **_Generate skeleton graph_**: - Generates a complete undirected graph with all potential ties - Deletes ties if there if conditionally independent (given some set significance level) 2. **_Locate"v-structures" in the skeleton graph_** - Considers all triplets ( `\(i\)` — `\(j\)` — `\(k\)`) where `\(i\)` and `\(k\)` are not adjacent (i.e. connected) - Checks if `\(j\)` is a collider - Check for consistency across all v-structures. 3. **_Determine edge orientations_** - if a collider, make a call. Else a bidirected edge is inserted (can't differentiate between a fork and a chain) --- ![:space 5] <img src="week-03-causal-inference-ppol561_files/figure-html/unnamed-chunk-36-1.png" style="display: block; margin: auto;" /> --- ![:space 5] <img src="week-03-causal-inference-ppol561_files/figure-html/unnamed-chunk-37-1.png" style="display: block; margin: auto;" /> --- ![:space 5] <img src="week-03-causal-inference-ppol561_files/figure-html/unnamed-chunk-38-1.png" style="display: block; margin: auto;" /> --- ![:space 5] <img src="week-03-causal-inference-ppol561_files/figure-html/unnamed-chunk-39-1.png" style="display: block; margin: auto;" /> --- ![:space 5] <img src="week-03-causal-inference-ppol561_files/figure-html/unnamed-chunk-40-1.png" style="display: block; margin: auto;" /> --- ![:space 5] <img src="week-03-causal-inference-ppol561_files/figure-html/unnamed-chunk-41-1.png" style="display: block; margin: auto;" /> --- ![:space 5] <img src="week-03-causal-inference-ppol561_files/figure-html/unnamed-chunk-42-1.png" style="display: block; margin: auto;" /> --- ![:space 5] <img src="week-03-causal-inference-ppol561_files/figure-html/unnamed-chunk-43-1.png" style="display: block; margin: auto;" /> --- ```r head(d,10) ``` ``` ## y x z u p ## 1 -1.8713283 -2.2181856 -1.556274371 -0.5116037 -0.56047565 ## 2 -0.3830815 -1.3609518 -1.270132533 0.2369379 -0.23017749 ## 3 1.6701431 -0.4490264 1.540728074 -0.5415892 1.55870831 ## 4 -0.1265969 0.4602763 -0.061666741 1.2192276 0.07050839 ## 5 -4.2720287 0.3525711 -2.420055040 0.1741359 0.12928774 ## 6 4.3456962 2.1029551 2.755638443 -0.6152683 1.71506499 ## 7 -0.8648611 -0.1827591 0.710641942 -1.8068930 0.46091621 ## 8 0.8831073 0.3229385 1.151146139 -0.6436811 -1.26506123 ## 9 0.8513957 2.6541885 -0.001654614 2.0460189 -0.68685285 ## 10 -0.3208339 -1.5061105 -0.892621279 -0.5607624 -0.44566197 ``` --- Packages you'll need to install to run causal discovery algorithms in `R`. ```r install.packages("BiocManager") BiocManager::install("RBGL") BiocManager::install("graph") install.packages("pcalg") ``` -- ![:space 2] Set our statistic that we'll use to assess conditional independence. Here we'll use the correlation, which is parametric (linear) statistic. ```r ci_stat <- list(C = cor(d), n = nrow(d)) ``` -- ![:space 2] And we'll use a test for conditional independence (Fisher's z-transformation of the partial correlation), provided by the `pcalg` package. ```r ci_test <- pcalg::gaussCItest ``` --- ```r skeleton_graph <- pcalg::skeleton(suffStat = ci_stat, indepTest = ci_test, labels = colnames(d), # node labels alpha = 0.05) # Significance level Rgraphviz::plot(skeleton_graph) # Plot the skeleton graph ``` <img src="week-03-causal-inference-ppol561_files/figure-html/unnamed-chunk-49-1.png" style="display: block; margin: auto;" /> --- ```r pc_gauss <- pcalg::pc(suffStat= ci_stat, indepTest = ci_test, labels = colnames(d), alpha = 0.05) Rgraphviz::plot(pc_gauss) ``` <img src="week-03-causal-inference-ppol561_files/figure-html/unnamed-chunk-50-1.png" style="display: block; margin: auto;" /> --- ## Other Algorithms - Greedy Equivalence Search (GES Algorithm) - no hidden and selection variables. - Fast Causal Inference (FCI Algorithm) - allows for hidden and selection variables. - Really Fast Causal Inference (RFCI Algorithm) - allows for hidden and selection variables. - Greedy Interventional Equivalence Search (GIES Algorithm) - no hidden and selection variables. - Iterative Deepening Algorithm (IDA) - no hidden and selection variables. - Generalized Backdoor Criterion - allows for hidden but no selection variables. --- class: newsection # Potential Outcomes --- ![:space 13.5] <img src="week-03-causal-inference-ppol561_files/figure-html/unnamed-chunk-51-1.png" style="display: block; margin: auto;" /> --- ![:space 13.5] <img src="week-03-causal-inference-ppol561_files/figure-html/unnamed-chunk-52-1.png" style="display: block; margin: auto;" /> --- ![:space 5] Considering school (and intervention/treatment) <img src="week-03-causal-inference-ppol561_files/figure-html/unnamed-chunk-53-1.png" style="display: block; margin: auto;" /> --- ![:space 4] Can only observe **_one outcome_** <img src="week-03-causal-inference-ppol561_files/figure-html/unnamed-chunk-54-1.png" style="display: block; margin: auto;" /> --- ![:space 4] Cannot observe the **_counter-factual_** <img src="week-03-causal-inference-ppol561_files/figure-html/unnamed-chunk-55-1.png" style="display: block; margin: auto;" /> --- ![:space 4] .center[ **The Fundamental Problem of Causal Inference** ] <img src="week-03-causal-inference-ppol561_files/figure-html/unnamed-chunk-56-1.png" style="display: block; margin: auto;" /> --- ## Potential Outcomes ![:space 5] `$$y_i(1) \equiv y_i(T=1)$$` `$$y_i(0) \equiv y_i(T=0)$$` ![:space 2] -- **Causal Treatment Effect** for unit `\(i\)` ![:space 1] $$ TE_i = y_i(1) - y_i(0)$$ ![:space 1] The causal effect is a comparison of the potential outcomes for the _same unit_ at the same moment in time. --- ### Quantities of interest **_Average Treatment Effect_** `$$ATE = E[y_i(1) - y_i(0)] =\frac{1}{N}\sum_{i=1}^N (y_i(1) - y_i(0))$$` ![:space 1] -- **_Average Treatment Effect for the Treated Group_** ![:space 1] `$$ATT = E[y_i(1)|T=1] - E[y_i(0)|T=1]$$` ![:space 1] -- **_Average Treatment Effect for the Control Group_** ![:space 1] `$$ATU = E[y_i(1)|T=0] - E[y_i(0)|T=0]$$` --- ## Potential Outcomes **_Fundamental Problem of Causal Inference_** is that we can only observe one state At its core, the potential outcomes framework treats causal identification as a **_missing data problem_**: _Given any treatment assigned to an individual unit, the potential outcome associated with any alternate treatment is missing._ $$ TE_i = y_i(1) - y_i(0)$$ $$ TE_i = y_i(1) - \color{lightgrey}{y_i(0)}$$ $$ TE_i = \text{observed} - \color{lightgrey}{\text{unobserved}}$$ We must **_rely on multiple units_** to make **_inferences_** about the causal quantity (effect). --- ![:space 10] .center[ <table class="table" style="font-size: 20px; margin-left: auto; margin-right: auto;"> <caption style="font-size: initial !important;">Cunningham 2018</caption> <thead> <tr> <th style="text-align:center;"> Patients </th> <th style="text-align:center;"> y_1 </th> <th style="text-align:center;"> y_0 </th> <th style="text-align:center;"> TE </th> </tr> </thead> <tbody> <tr> <td style="text-align:center;"> 1 </td> <td style="text-align:center;"> 7 </td> <td style="text-align:center;"> 1 </td> <td style="text-align:center;"> 6 </td> </tr> <tr> <td style="text-align:center;"> 2 </td> <td style="text-align:center;"> 5 </td> <td style="text-align:center;"> 6 </td> <td style="text-align:center;"> -1 </td> </tr> <tr> <td style="text-align:center;"> 3 </td> <td style="text-align:center;"> 5 </td> <td style="text-align:center;"> 1 </td> <td style="text-align:center;"> 4 </td> </tr> <tr> <td style="text-align:center;"> 4 </td> <td style="text-align:center;"> 7 </td> <td style="text-align:center;"> 8 </td> <td style="text-align:center;"> -1 </td> </tr> <tr> <td style="text-align:center;"> 5 </td> <td style="text-align:center;"> 4 </td> <td style="text-align:center;"> 2 </td> <td style="text-align:center;"> 2 </td> </tr> <tr> <td style="text-align:center;"> 6 </td> <td style="text-align:center;"> 10 </td> <td style="text-align:center;"> 1 </td> <td style="text-align:center;"> 9 </td> </tr> <tr> <td style="text-align:center;"> 7 </td> <td style="text-align:center;"> 1 </td> <td style="text-align:center;"> 10 </td> <td style="text-align:center;"> -9 </td> </tr> <tr> <td style="text-align:center;"> 8 </td> <td style="text-align:center;"> 5 </td> <td style="text-align:center;"> 6 </td> <td style="text-align:center;"> -1 </td> </tr> <tr> <td style="text-align:center;"> 9 </td> <td style="text-align:center;"> 3 </td> <td style="text-align:center;"> 7 </td> <td style="text-align:center;"> -4 </td> </tr> <tr> <td style="text-align:center;"> 10 </td> <td style="text-align:center;"> 9 </td> <td style="text-align:center;"> 8 </td> <td style="text-align:center;"> 1 </td> </tr> </tbody> </table> ] ```r cat("ATE =",mean(D$y_1 - D$y_0)) ``` ``` ## ATE = 0.6 ``` --- ![:space 10] .center[ <table class="table" style="font-size: 20px; margin-left: auto; margin-right: auto;"> <caption style="font-size: initial !important;">Cunningham 2018</caption> <thead> <tr> <th style="text-align:center;"> Patients </th> <th style="text-align:center;"> y </th> <th style="text-align:center;"> T </th> </tr> </thead> <tbody> <tr> <td style="text-align:center;"> 1 </td> <td style="text-align:center;"> 7 </td> <td style="text-align:center;"> 1 </td> </tr> <tr> <td style="text-align:center;"> 2 </td> <td style="text-align:center;"> 6 </td> <td style="text-align:center;"> 0 </td> </tr> <tr> <td style="text-align:center;"> 3 </td> <td style="text-align:center;"> 5 </td> <td style="text-align:center;"> 1 </td> </tr> <tr> <td style="text-align:center;"> 4 </td> <td style="text-align:center;"> 8 </td> <td style="text-align:center;"> 0 </td> </tr> <tr> <td style="text-align:center;"> 5 </td> <td style="text-align:center;"> 4 </td> <td style="text-align:center;"> 1 </td> </tr> <tr> <td style="text-align:center;"> 6 </td> <td style="text-align:center;"> 10 </td> <td style="text-align:center;"> 1 </td> </tr> <tr> <td style="text-align:center;"> 7 </td> <td style="text-align:center;"> 10 </td> <td style="text-align:center;"> 0 </td> </tr> <tr> <td style="text-align:center;"> 8 </td> <td style="text-align:center;"> 6 </td> <td style="text-align:center;"> 0 </td> </tr> <tr> <td style="text-align:center;"> 9 </td> <td style="text-align:center;"> 7 </td> <td style="text-align:center;"> 0 </td> </tr> <tr> <td style="text-align:center;"> 10 </td> <td style="text-align:center;"> 9 </td> <td style="text-align:center;"> 1 </td> </tr> </tbody> </table> ] ![:space 2] In this example, patients are assigned to the treatment _if it gives them a better outcome_. --- ![:space 10] We can estimate the ATE by comparing the **_difference in mean outcomes_** across the treatment and control group, containing _many similar individuals_. ![:space 5] $$ E[y_i|T_i=1] - E[y_i|T_i=0] $$ ![:space 5] -- ```r cat("(observed) ATE =", mean(D_obs$y[D_obs$T==1]) - mean(D_obs$y[D_obs$T==0])) ``` ``` ## (observed) ATE = -0.4 ``` ![:space 5] Our estimate for the ATE in the observed data is way off from the true ATE (.6). Why? --- ![:space 3] An issue emerges when the **_assignment mechanism_** (i.e. how units get into the treatment or control groups) **_depends on the outcome_**. ![:space 3] Such non-randomness generates: **_selection_** and **_heterogeneous treatment effect bias_**. <img src="week-03-causal-inference-ppol561_files/figure-html/unnamed-chunk-61-1.png" style="display: block; margin: auto;" /> --- ![:space 3] An issue emerges when the **_assignment mechanism_** (i.e. how units get into the treatment or control groups) **_depends on the outcome_**. A **_random assignment_** mechanism breaks any potential association between non-random unobservables and the outcome. `$$y_i(1),y_i(0) \perp\!\!\!\!\perp A$$` <img src="week-03-causal-inference-ppol561_files/figure-html/unnamed-chunk-62-1.png" style="display: block; margin: auto;" /> --- ### Stable Unit Treatment Value Assumption (SUTVA) > "The potential outcomes for any unit do not vary with the treatments assigned to other units, and, for each unit, there are no different forms or versions of each treatment level, which lead to different potential outcomes." (Imbens and Rubin 2015, pg. 10) ![:space 2] - **No Interference** - My being treated doesn't effect your outcome( `\(y_i\)` ) - "Spillover" ![:space 2] - **No Hidden Variations of Treatments** - Every treated unit is treated with the same intervention --- ### Common Support Assumption ![:space 10] `$$pr(T_i = 1 |X_i) < 1$$` ![:space 5] - It must be conceivable that a treated unit **_could have been assigned_** to the control group. ![:space 5] - If this doesn't hold, then **_ `\(y_i(0)\)` doesn't even logically exist_**. --- ## Comparing Frameworks - Both the SCM and PO frameworks **_aim to eliminate confoundedness_**. - **_Controls_** - SCMs differentiate **_confounders from colliders_**, aiding in the selection of [good and bad controls](http://causality.cs.ucla.edu/blog/index.php/2019/08/14/a-crash-course-in-good-and-bad-control/) - PO often requires identification strategies **_conditional on controls_** (we'll learn them in the coming weeks). - Both methods require careful specification and consideration of the elements in the model necessary for valid identification. - Ultimately, both are **_conceptual frameworks_** for thinking about and formalizing causal identification strategies.