class: center, middle, inverse, title-slide # How Economists Learn from Data ## EC 201: Principles of Microeconomics ### Kyle Raze ### Winter 2020 --- class: inverse, middle # Prologue --- # Learning from Data ## Last Time 1. Why bother learning from data? - Figure out whether policies work or don't work. - Test theories. 2. Why does correlation .mono[!=] causation? - Selection bias! 3. When can correlation .mono[==>] causation? - Randomized contrial trials (experiments). --- # Learning from Data ## Today 1. Regression analysis. - The workhorse of data science. 2. Natural experiments. - Sometimes we get lucky. --- class: inverse, middle # Regression --- # Correlation ## Correlation coefficient .pull-left[ > A measure of the strength of a relationship between two variables, denoted by `\(\rho\)`. -1 .mono[<=] `\(\rho\)` .mono[<] 0 .mono[==>] .pink[negative correlation]. `\(\rho\)` .mono[=] 0 .mono[==>] .green[no correlation] (unrelated). 0 .mono[<] `\(\rho\)` .mono[<=] 1 .mono[==>] .purple[positive correlation]. ] .pull-right[ .center[Correlation coefficient .mono[=] -0.56] <img src="10-Data_Learning_files/figure-html/unnamed-chunk-2-1.svg" style="display: block; margin: auto;" /> ] --- count: false # Correlation ## Correlation coefficient .pull-left[ > A measure of the strength of a relationship between two variables, denoted by `\(\rho\)`. -1 .mono[<=] `\(\rho\)` .mono[<] 0 .mono[==>] .pink[negative correlation]. `\(\rho\)` .mono[=] 0 .mono[==>] .green[no correlation] (unrelated). 0 .mono[<] `\(\rho\)` .mono[<=] 1 .mono[==>] .purple[positive correlation]. ] .pull-right[ .center[Correlation coefficient .mono[=] -1] <img src="10-Data_Learning_files/figure-html/unnamed-chunk-4-1.svg" style="display: block; margin: auto;" /> ] --- count: false # Correlation ## Correlation coefficient .pull-left[ > A measure of the strength of a relationship between two variables, denoted by `\(\rho\)`. -1 .mono[<=] `\(\rho\)` .mono[<] 0 .mono[==>] .pink[negative correlation]. `\(\rho\)` .mono[=] 0 .mono[==>] .green[no correlation] (unrelated). 0 .mono[<] `\(\rho\)` .mono[<=] 1 .mono[==>] .purple[positive correlation]. ] .pull-right[ .center[Correlation coefficient .mono[=] -0.1] <img src="10-Data_Learning_files/figure-html/unnamed-chunk-6-1.svg" style="display: block; margin: auto;" /> ] --- count: false # Correlation ## Correlation coefficient .pull-left[ > A measure of the strength of a relationship between two variables, denoted by `\(\rho\)`. -1 .mono[<=] `\(\rho\)` .mono[<] 0 .mono[==>] .pink[negative correlation]. `\(\rho\)` .mono[=] 0 .mono[==>] .green[no correlation] (unrelated). 0 .mono[<] `\(\rho\)` .mono[<=] 1 .mono[==>] .purple[positive correlation]. ] .pull-right[ .center[Correlation coefficient .mono[=] 0.58] <img src="10-Data_Learning_files/figure-html/unnamed-chunk-8-1.svg" style="display: block; margin: auto;" /> ] --- # Regression **Goal:** Identify the effect of a treatment variable `\(X\)` on an outcome variable `\(Y\)` while .hi[controlling] .pink[for potential confounders]. Economists often rely on regression analysis for statistical comparisons. - Regression analysis facilitates *other things equal* comparisons by explicitly controlling for certain variables. - Failure to control for confounding variables leads to .hi[omitted-variable bias], a close cousin of selection bias. --- # Simple Linear Regression .more-left[ .center[.purple[Y.sub[*i*] .mono[=] 6.43 .mono[+] 2.64 X.sub[*i*]]] <img src="10-Data_Learning_files/figure-html/unnamed-chunk-10-1.svg" style="display: block; margin: auto;" /> ] .less-right[ ## Model `\(Y_i = \beta_1 + \beta_2 X_i + e_i\)` - `\(\beta_1\)` .mono[=] intercept - `\(\beta_2\)` .mono[=] slope - `\(e_i\)` .mono[=] error term ] --- # Simple Linear Regression .more-left[ .center[.purple[Crime.sub[*i*] .mono[=] 18.41 .mono[+] 1.76 Police.sub[*i*]]] <img src="10-Data_Learning_files/figure-html/unnamed-chunk-12-1.svg" style="display: block; margin: auto;" /> ] -- .less-right[ **Q:** Do 👮 *cause* crime!? ] --- count: false # Simple Linear Regression .more-left[ .center[.purple[Crime.sub[*i*] .mono[=] 18.41 .mono[+] 1.76 Police.sub[*i*]]] <img src="10-Data_Learning_files/figure-html/unnamed-chunk-14-1.svg" style="display: block; margin: auto;" /> ] .less-right[ **Q:** Do 👮 *cause* crime!? **A:** .pink[Probably not] <br> .pink[.mono[-->] Colleges experiencing high crime rates probably respond by hiring more police.] ] --- # Causality ## Example: Returns to Education The optimal investment in education by students, parents, and legislators depends in part on the monetary *return to education*. -- .hi-purple[Thought experiment:] - Randomly select an individual. - Give her an additional year of education. - How much do her earnings increase? The change in her earnings describes the .hi-slate[causal effect] of education on earnings. --- # Causality ## Example: Returns to Education .more-left[ .center[.purple[Earnings.sub[*i*] .mono[=] 146.95 .mono[+] 60.21 Schooling.sub[*i*]]] <img src="10-Data_Learning_files/figure-html/unnamed-chunk-16-1.svg" style="display: block; margin: auto;" /> ] .less-right[ **Q:** Does the slope isolate the causal effect of an additional year of education on weekly earnings? ] --- count: false # Causality ## Example: Returns to Education .more-left[ .center[.purple[Earnings.sub[*i*] .mono[=] 146.95 .mono[+] 60.21 Schooling.sub[*i*]]] <img src="10-Data_Learning_files/figure-html/unnamed-chunk-18-1.svg" style="display: block; margin: auto;" /> ] .less-right[ **Q:** Does the slope isolate the causal effect of an additional year of education on weekly earnings? **A:** .pink[Probably not] <br> .pink[.mono[-->] There could be other variables that influence earnings and schooling.] ] --- # Omitted Variables .more-left[ <img src="10-Data_Learning_files/figure-html/venn2-1.svg" style="display: block; margin: auto;" /> ] .less-right[ .pink[**Y**] .mono[=] Outcome .green[**X**] .mono[=] Treatment .orange[**W**] .mono[=] Omitted variable If .orange[**W**] is correlated with both .green[**X**] and .pink[**Y**] .mono[-->] omitted variable bias .mono[-->] regression fails to isolate the causal effect of .green[**X**] on .pink[**Y**]. ] --- count: false # Omitted Variables .more-left[ <img src="10-Data_Learning_files/figure-html/unnamed-chunk-19-1.svg" style="display: block; margin: auto;" /> ] .less-right[ .pink[**Y**] .mono[=] Outcome .green[**X**] .mono[=] Treatment .orange[**W**] .mono[=] Omitted variable If .orange[**W**] is correlated with both .green[**X**] and .pink[**Y**] .mono[-->] omitted variable bias .mono[-->] regression fails to isolate the causal effect of .green[**X**] on .pink[**Y**]. ] --- # Controlling for Confounders Economists can control for a confounder `\(W\)` by including it in the regression model: `$$Y_i = \beta_0 + \beta_1 X_i + \beta_2 W_i + e_i$$` - `\(W_i\)` is a **control variable**. - By including `\(W_i\)`, adjusts the data to account for confounding effects of `\(W\)`. - **Note:** The model doesn't care whether a right-hand side variable is a treatment or control variable, but we do. --- # Controlling for Confounders .center[] --- # Controlling for Confounders ## Example: Returns to Education Two regressions of earnings on schooling. The second regression controls for IQ score, a proxy for ability. .pull-left[ <table> <caption>Outcome: Weekly Earnings</caption> <thead> <tr> <th style="text-align:left;"> Parameter </th> <th style="text-align:center;"> 1 </th> <th style="text-align:center;"> 2 </th> </tr> </thead> <tbody> <tr> <td style="text-align:left;color: #272822 !important;line-height: 110%;font-style: italic;color: black !important;"> Intercept </td> <td style="text-align:center;color: #272822 !important;line-height: 110%;font-weight: bold;"> 146.95 </td> <td style="text-align:center;color: #272822 !important;line-height: 110%;"> -128.89 </td> </tr> <tr> <td style="text-align:left;color: #272822 !important;color: #c2bebe !important;line-height: 110%;font-style: italic;color: black !important;"> </td> <td style="text-align:center;color: #272822 !important;color: #c2bebe !important;line-height: 110%;font-weight: bold;"> (77.72) </td> <td style="text-align:center;color: #272822 !important;color: #c2bebe !important;line-height: 110%;"> (92.18) </td> </tr> <tr> <td style="text-align:left;color: #272822 !important;line-height: 110%;font-style: italic;color: black !important;"> Schooling (Years) </td> <td style="text-align:center;color: #272822 !important;line-height: 110%;font-weight: bold;"> 60.21 </td> <td style="text-align:center;color: #272822 !important;line-height: 110%;"> 42.06 </td> </tr> <tr> <td style="text-align:left;color: #272822 !important;color: #c2bebe !important;line-height: 110%;font-style: italic;color: black !important;"> </td> <td style="text-align:center;color: #272822 !important;color: #c2bebe !important;line-height: 110%;font-weight: bold;"> (5.70) </td> <td style="text-align:center;color: #272822 !important;color: #c2bebe !important;line-height: 110%;"> (6.55) </td> </tr> <tr> <td style="text-align:left;color: #272822 !important;line-height: 110%;font-style: italic;color: black !important;"> IQ Score (Points) </td> <td style="text-align:center;color: #272822 !important;line-height: 110%;font-weight: bold;"> </td> <td style="text-align:center;color: #272822 !important;line-height: 110%;"> 5.14 </td> </tr> <tr> <td style="text-align:left;color: #272822 !important;color: #c2bebe !important;line-height: 110%;font-style: italic;color: black !important;"> </td> <td style="text-align:center;color: #272822 !important;color: #c2bebe !important;line-height: 110%;font-weight: bold;"> </td> <td style="text-align:center;color: #272822 !important;color: #c2bebe !important;line-height: 110%;"> (0.96) </td> </tr> </tbody> </table> .center[*Standard errors in parentheses.*] ] .pull-right[ ] --- count: false # Controlling for Confounders ## Example: Returns to Education Two regressions of earnings on schooling. The second regression controls for IQ score, a proxy for ability. .pull-left[ <table> <caption>Outcome: Weekly Earnings</caption> <thead> <tr> <th style="text-align:left;"> Parameter </th> <th style="text-align:center;"> 1 </th> <th style="text-align:center;"> 2 </th> </tr> </thead> <tbody> <tr> <td style="text-align:left;color: #272822 !important;line-height: 110%;font-style: italic;color: black !important;"> Intercept </td> <td style="text-align:center;color: #272822 !important;line-height: 110%;"> 146.95 </td> <td style="text-align:center;color: #272822 !important;line-height: 110%;font-weight: bold;"> -128.89 </td> </tr> <tr> <td style="text-align:left;color: #272822 !important;color: #c2bebe !important;line-height: 110%;font-style: italic;color: black !important;"> </td> <td style="text-align:center;color: #272822 !important;color: #c2bebe !important;line-height: 110%;"> (77.72) </td> <td style="text-align:center;color: #272822 !important;color: #c2bebe !important;line-height: 110%;font-weight: bold;"> (92.18) </td> </tr> <tr> <td style="text-align:left;color: #272822 !important;line-height: 110%;font-style: italic;color: black !important;"> Schooling (Years) </td> <td style="text-align:center;color: #272822 !important;line-height: 110%;"> 60.21 </td> <td style="text-align:center;color: #272822 !important;line-height: 110%;font-weight: bold;"> 42.06 </td> </tr> <tr> <td style="text-align:left;color: #272822 !important;color: #c2bebe !important;line-height: 110%;font-style: italic;color: black !important;"> </td> <td style="text-align:center;color: #272822 !important;color: #c2bebe !important;line-height: 110%;"> (5.70) </td> <td style="text-align:center;color: #272822 !important;color: #c2bebe !important;line-height: 110%;font-weight: bold;"> (6.55) </td> </tr> <tr> <td style="text-align:left;color: #272822 !important;line-height: 110%;font-style: italic;color: black !important;"> IQ Score (Points) </td> <td style="text-align:center;color: #272822 !important;line-height: 110%;"> </td> <td style="text-align:center;color: #272822 !important;line-height: 110%;font-weight: bold;"> 5.14 </td> </tr> <tr> <td style="text-align:left;color: #272822 !important;color: #c2bebe !important;line-height: 110%;font-style: italic;color: black !important;"> </td> <td style="text-align:center;color: #272822 !important;color: #c2bebe !important;line-height: 110%;"> </td> <td style="text-align:center;color: #272822 !important;color: #c2bebe !important;line-height: 110%;font-weight: bold;"> (0.96) </td> </tr> </tbody> </table> .center[*Standard errors in parentheses.*] ] -- .pull-right[ .orange[Bias] from omitting IQ score <br> `\(\quad\)` .mono[=] .pink["short"] .mono[-] .purple["long"] <br> `\(\quad\)` .mono[=] .pink[60.21] .mono[-] .purple[42.06] <br> `\(\quad\)` .mono[=] .orange[18.15] The first regression mistakenly attributes some of the influence of intelligence to education. ] --- class: inverse, middle # Natural Experiments --- # Causality **Q:** Given that selection bias and omitted variables are ubiquitous, how can economists estimate the returns to education and other causal effects of other interventions? -- .hi-slate[Option 1:] Run an .hi[experiment]. -- - Randomly .pink[assign education] (might be difficult/unethical). - Randomly .pink[encourage education] (might work). - Randomly .pink[assign programs] that affect education (*e.g.*, mentoring). -- .hi-slate[Option 2:] Look for a .hi-purple[natural experiment] (*e.g.,* a policy or accident in society that arbitrarily increased education for one subset of people). -- - Admissions .purple[cutoffs]. - .purple[Lottery] enrollment and/or capacity .purple[constraints]. --- # Oregon Medicaid Experiment ## Background As of 2016, 27 million Americans do not have health insurance. - Down from 46.5 million in 2010. - US is the only developed country without universal coverage. -- Healthcare spending accounts for a growing share of the economy. - Almost 18% of GDP or $10,000 per person per year! - US spends more on healthcare than any other developed country. --- # Oregon Medicaid Experiment ## Background **Medicaid:** A social assistance program that provides health insurance to families on welfare, the disabled, other children from low-income families, and low-income pregnant women. - Federal program run by states. -- **Policy Question:** Should we expand Medicaid to cover more of the uninsured? -- **Research Questions** - Would Medicaid expansion reduce costly emergency room visits? - Would Medicaid expansion improve health? --- # Oregon Medicaid Experiment ## Natural Experiment In 2008, Oregon decided to expand its version of Medicaid, called Oregon Health Plan (OHP). - **Problem:** 75,000 applicants, but only 30,000 spots! - **Solution:** Ration spots by lottery. -- Lottery .mono[=] random assignment! - .pink[**Treatment group:**] 30,000 lottery winners. - .purple[**Control group:**] 45,000 people who did not win medicaid lottery. --- class: clear-slide .center[**Effect of OHP on Coverage and Healthcare Use**] <table> <thead> <tr> <th style="text-align:left;"> Outcome </th> <th style="text-align:center;"> Control Mean </th> <th style="text-align:center;"> Treatment Effect </th> <th style="text-align:center;"> Standard Error </th> <th style="text-align:center;"> N </th> </tr> </thead> <tbody> <tr> <td style="text-align:left;color: #272822 !important;line-height: 110%;font-style: italic;color: black !important;"> Ever on Medicaid? </td> <td style="text-align:center;color: #272822 !important;line-height: 110%;"> 0.141 </td> <td style="text-align:center;color: #272822 !important;line-height: 110%;"> 0.256 </td> <td style="text-align:center;color: #272822 !important;line-height: 110%;"> 0.004 </td> <td style="text-align:center;color: #272822 !important;line-height: 110%;"> 74922 </td> </tr> <tr> <td style="text-align:left;color: #272822 !important;line-height: 110%;font-style: italic;color: black !important;"> Any hospital admissions? </td> <td style="text-align:center;color: #272822 !important;line-height: 110%;"> 0.067 </td> <td style="text-align:center;color: #272822 !important;line-height: 110%;"> 0.005 </td> <td style="text-align:center;color: #272822 !important;line-height: 110%;"> 0.002 </td> <td style="text-align:center;color: #272822 !important;line-height: 110%;"> 74922 </td> </tr> <tr> <td style="text-align:left;color: #272822 !important;line-height: 110%;font-style: italic;color: black !important;"> Any emergency room visits? </td> <td style="text-align:center;color: #272822 !important;line-height: 110%;"> 0.345 </td> <td style="text-align:center;color: #272822 !important;line-height: 110%;"> 0.017 </td> <td style="text-align:center;color: #272822 !important;line-height: 110%;"> 0.006 </td> <td style="text-align:center;color: #272822 !important;line-height: 110%;"> 24646 </td> </tr> <tr> <td style="text-align:left;color: #272822 !important;line-height: 110%;font-style: italic;color: black !important;"> Emergency room visits </td> <td style="text-align:center;color: #272822 !important;line-height: 110%;"> 1.020 </td> <td style="text-align:center;color: #272822 !important;line-height: 110%;"> 0.101 </td> <td style="text-align:center;color: #272822 !important;line-height: 110%;"> 0.029 </td> <td style="text-align:center;color: #272822 !important;line-height: 110%;"> 24646 </td> </tr> <tr> <td style="text-align:left;color: #272822 !important;line-height: 110%;font-style: italic;color: black !important;"> Outpatient visits </td> <td style="text-align:center;color: #272822 !important;line-height: 110%;"> 1.910 </td> <td style="text-align:center;color: #272822 !important;line-height: 110%;"> 0.314 </td> <td style="text-align:center;color: #272822 !important;line-height: 110%;"> 0.054 </td> <td style="text-align:center;color: #272822 !important;line-height: 110%;"> 23741 </td> </tr> <tr> <td style="text-align:left;color: #272822 !important;line-height: 110%;font-style: italic;color: black !important;"> Any prescriptions? </td> <td style="text-align:center;color: #272822 !important;line-height: 110%;"> 0.637 </td> <td style="text-align:center;color: #272822 !important;line-height: 110%;"> 0.025 </td> <td style="text-align:center;color: #272822 !important;line-height: 110%;"> 0.008 </td> <td style="text-align:center;color: #272822 !important;line-height: 110%;"> 23741 </td> </tr> </tbody> </table> **Informal Rule:** Estimate of treatment effect more than twice its standard error .mono[==>] effect is statistically distinguishable from zero. --- class: clear-slide .center[**Effect of OHP on Health and Personal Finances**] <table> <thead> <tr> <th style="text-align:left;"> Outcome </th> <th style="text-align:center;"> Control Mean </th> <th style="text-align:center;"> Treatment Effect </th> <th style="text-align:center;"> Standard Error </th> <th style="text-align:center;"> N </th> </tr> </thead> <tbody> <tr> <td style="text-align:left;color: #272822 !important;line-height: 110%;font-style: italic;color: black !important;"> Good Health? </td> <td style="text-align:center;color: #272822 !important;line-height: 110%;"> 0.548 </td> <td style="text-align:center;color: #272822 !important;line-height: 110%;"> 0.039 </td> <td style="text-align:center;color: #272822 !important;line-height: 110%;"> 0.008 </td> <td style="text-align:center;color: #272822 !important;line-height: 110%;"> 23741 </td> </tr> <tr> <td style="text-align:left;color: #272822 !important;line-height: 110%;font-style: italic;color: black !important;"> Physical health index </td> <td style="text-align:center;color: #272822 !important;line-height: 110%;"> 45.500 </td> <td style="text-align:center;color: #272822 !important;line-height: 110%;"> 0.290 </td> <td style="text-align:center;color: #272822 !important;line-height: 110%;"> 0.210 </td> <td style="text-align:center;color: #272822 !important;line-height: 110%;"> 12229 </td> </tr> <tr> <td style="text-align:left;color: #272822 !important;line-height: 110%;font-style: italic;color: black !important;"> Mental health index </td> <td style="text-align:center;color: #272822 !important;line-height: 110%;"> 44.400 </td> <td style="text-align:center;color: #272822 !important;line-height: 110%;"> 0.470 </td> <td style="text-align:center;color: #272822 !important;line-height: 110%;"> 0.240 </td> <td style="text-align:center;color: #272822 !important;line-height: 110%;"> 12229 </td> </tr> <tr> <td style="text-align:left;color: #272822 !important;line-height: 110%;font-style: italic;color: black !important;"> Cholesterol </td> <td style="text-align:center;color: #272822 !important;line-height: 110%;"> 204.000 </td> <td style="text-align:center;color: #272822 !important;line-height: 110%;"> 0.530 </td> <td style="text-align:center;color: #272822 !important;line-height: 110%;"> 0.690 </td> <td style="text-align:center;color: #272822 !important;line-height: 110%;"> 12229 </td> </tr> <tr> <td style="text-align:left;color: #272822 !important;line-height: 110%;font-style: italic;color: black !important;"> Systolic blood pressure </td> <td style="text-align:center;color: #272822 !important;line-height: 110%;"> 119.000 </td> <td style="text-align:center;color: #272822 !important;line-height: 110%;"> -0.130 </td> <td style="text-align:center;color: #272822 !important;line-height: 110%;"> 0.300 </td> <td style="text-align:center;color: #272822 !important;line-height: 110%;"> 12229 </td> </tr> <tr> <td style="text-align:left;color: #272822 !important;line-height: 110%;font-style: italic;color: black !important;"> Big medical expenditures? </td> <td style="text-align:center;color: #272822 !important;line-height: 110%;"> 0.055 </td> <td style="text-align:center;color: #272822 !important;line-height: 110%;"> -0.011 </td> <td style="text-align:center;color: #272822 !important;line-height: 110%;"> 0.005 </td> <td style="text-align:center;color: #272822 !important;line-height: 110%;"> 12229 </td> </tr> <tr> <td style="text-align:left;color: #272822 !important;line-height: 110%;font-style: italic;color: black !important;"> Any medical debt? </td> <td style="text-align:center;color: #272822 !important;line-height: 110%;"> 0.568 </td> <td style="text-align:center;color: #272822 !important;line-height: 110%;"> -0.032 </td> <td style="text-align:center;color: #272822 !important;line-height: 110%;"> 0.010 </td> <td style="text-align:center;color: #272822 !important;line-height: 110%;"> 12229 </td> </tr> </tbody> </table> **Informal Rule:** Estimate of treatment effect more than twice its standard error .mono[==>] effect is statistically distinguishable from zero. --- class: inverse, middle # Differences-in-Differences --- # Minimum Wage **Research Question:** Do binding minimum wage laws cause unemployment? - Theory predicts that binding minimum wage laws reduce employment levels. - **Q:** How could we test this prediction? -- **Idea 1:** Compare employment levels in states with binding minimum wage laws to those without. - **Q:** Is this a good idea? Would it isolate the causal effect? -- - **A:** Probably not. States with binding minimum wages laws are different than those without .mono[-->] selection bias! --- # Minimum Wage **Research Question:** Do binding minimum wage laws cause unemployment? - Theory predicts that binding minimum wage laws reduce employment levels. - **Q:** How could we test this prediction? **Idea 2:** Compare employment levels in a state before and after it increases the minimum wage? - **Q:** Is this a good idea? Would it isolate the causal effect? -- - **A:** Probably not. Other things might coincide with the policy change (*e.g.,* a recession) .mono[-->] omitted variable bias! --- # Minimum Wage **Research Question:** Do binding minimum wage laws cause unemployment? - Theory predicts that binding minimum wage laws reduce employment levels. - **Q:** How could we test this prediction? **Idea 3:** Two wrongs make a right? - Compare employment levels in a state that raises its minimum wage with a state that doesn't, before and after the policy change. - A .pink[difference-in-differences] comparison. --- # Differences-in-Differences ## Card and Krueger (1994) Influential study of the impact of minimum wage laws on fast-food workers. -- **Natural Experiment:** New Jersey increased its minimum wage in 1992, but neighboring Pennsylvania did not. - .purple[**Control group:**] Fast food restaurants in Pennsylvania. - .pink[**Treatment group:**] Fast food restaurants in New Jersey. --- # Differences-in-Differences ## Card and Krueger (1994) .center[**Effect of Minimum Wage on Employment**] <table class="table" style="margin-left: auto; margin-right: auto;"> <caption>Outcome: Number Full-Time Workers</caption> <thead> <tr> <th style="text-align:left;"> Group </th> <th style="text-align:center;"> After </th> <th style="text-align:center;"> Before </th> <th style="text-align:center;"> Difference </th> </tr> </thead> <tbody> <tr> <td style="text-align:left;line-height: 110%;"> .pink[Treatment (NJ)] </td> <td style="text-align:center;line-height: 110%;"> 21.03 </td> <td style="text-align:center;line-height: 110%;"> 20.44 </td> <td style="text-align:center;line-height: 110%;"> </td> </tr> <tr> <td style="text-align:left;line-height: 110%;"> .purple[Control (PA)] </td> <td style="text-align:center;line-height: 110%;"> 21.17 </td> <td style="text-align:center;line-height: 110%;"> 23.33 </td> <td style="text-align:center;line-height: 110%;"> </td> </tr> </tbody> </table> Difference-in-differences .mono[=] --- count: false # Differences-in-Differences ## Card and Krueger (1994) .center[**Effect of Minimum Wage on Employment**] <table class="table" style="margin-left: auto; margin-right: auto;"> <caption>Outcome: Number Full-Time Workers</caption> <thead> <tr> <th style="text-align:left;"> Group </th> <th style="text-align:center;"> After </th> <th style="text-align:center;"> Before </th> <th style="text-align:center;"> Difference </th> </tr> </thead> <tbody> <tr> <td style="text-align:left;line-height: 110%;"> .pink[Treatment (NJ)] </td> <td style="text-align:center;line-height: 110%;"> 21.03 </td> <td style="text-align:center;line-height: 110%;"> 20.44 </td> <td style="text-align:center;line-height: 110%;"> 0.59 </td> </tr> <tr> <td style="text-align:left;line-height: 110%;"> .purple[Control (PA)] </td> <td style="text-align:center;line-height: 110%;"> 21.17 </td> <td style="text-align:center;line-height: 110%;"> 23.33 </td> <td style="text-align:center;line-height: 110%;"> -2.16 </td> </tr> </tbody> </table> Difference-in-differences .mono[=] --- count: false # Differences-in-Differences ## Card and Krueger (1994) .center[**Effect of Minimum Wage on Employment**] <table class="table" style="margin-left: auto; margin-right: auto;"> <caption>Outcome: Number Full-Time Workers</caption> <thead> <tr> <th style="text-align:left;"> Group </th> <th style="text-align:center;"> After </th> <th style="text-align:center;"> Before </th> <th style="text-align:center;"> Difference </th> </tr> </thead> <tbody> <tr> <td style="text-align:left;line-height: 110%;"> .pink[Treatment (NJ)] </td> <td style="text-align:center;line-height: 110%;"> 21.03 </td> <td style="text-align:center;line-height: 110%;"> 20.44 </td> <td style="text-align:center;line-height: 110%;"> 0.59 </td> </tr> <tr> <td style="text-align:left;line-height: 110%;"> .purple[Control (PA)] </td> <td style="text-align:center;line-height: 110%;"> 21.17 </td> <td style="text-align:center;line-height: 110%;"> 23.33 </td> <td style="text-align:center;line-height: 110%;"> -2.16 </td> </tr> </tbody> </table> Difference-in-differences .mono[=] .pink[0.59] .mono[-] .purple[-2.16] -- <br> `\(\quad\)` .mono[=] 2.75. -- **Result:** Increasing the minimum wage did not reduce employment! --- # Differences-in-Differences .more-left[ <img src="10-Data_Learning_files/figure-html/unnamed-chunk-28-1.svg" style="display: block; margin: auto;" /> ] .less-right[ ## Internal Validity **Q:** When should we trust a difference-in-differences comparison? **A:** When we believe that the comparison groups exhibit .hi-green[parallel trends] in the absence of the policy change. ] --- class: inverse, middle # Podcast --- class: clear-slide **Podcast Question:** According to Raj Chetty, > **A.** No social assistance program pays for itself in the long run, on average. > **B.** All social assistance programs pay for themselves in the long run, on average. > **C.** Social assistance programs that target adults tend to pay for themselves in the long run, but those targeted toward children do not, on average. > **D.** Social assistance programs that target children tend to pay for themselves in the long run, but those targeted toward adults do not, on average. --- count: false class: clear-slide **Podcast Question:** According to Raj Chetty, > **A.** No social assistance program pays for itself in the long run, on average. > **B.** All social assistance programs pay for themselves in the long run, on average. > **C.** Social assistance programs that target adults tend to pay for themselves in the long run, but those targeted toward children do not, on average. > .pink[**D.** Social assistance programs that target children tend to pay for themselves in the long run, but those targeted toward adults do not, on average.]