class: center middle main-title section-title-7 # IV II &<br>RDD II .class-info[ **Session 12** .light[PMAP 8521: Program evaluation<br> Andrew Young School of Policy Studies ] ] --- name: outline class: title title-inv-8 # Plan for today -- .box-4.medium.sp-after-half[Treatment effects and compliance] -- .box-1.medium.sp-after-half[Randomized promotion] -- .box-6.medium.sp-after-half[Fuzzy regression discontinuity] --- layout: false name: treatment-effects class: center middle section-title section-title-4 animated fadeIn # Treatment effects<br>and compliance --- layout: true class: title title-4 --- # Potential outcomes .medium[ $$ \delta = (Y |\ P = 1) - (Y |\ P = 0) $$ ] -- .box-inv-4[δ (delta) = causal effect] -- .box-inv-4[P = Program] -- .box-inv-4[Y = Outcome] -- .medium[ $$ \delta = Y_1 - Y_0 $$ ] --- layout: false .box-4.medium[Fundamental problem<br>of causal inference] -- .less-medium[ $$ \delta_i = Y_i^1 - Y_i^0 \quad \text{in real life is} \quad \delta_i = Y_i^1 - ??? $$ ] -- .box-inv-4.medium[Individual-level effects are<br>impossible to observe!] --- layout: true class: title title-4 --- # Average treatment effect .box-inv-4[Difference between average/expected value when<br>program is on vs. expected value when program is off] .less-medium[ $$ \text{ATE} = E(Y_1 - Y_0) = E(Y_1) - E(Y_0) $$ ] -- .box-inv-4[Can be found for a whole population, on average] .less-medium[ $$ \delta = (\bar{Y}\ |\ P = 1) - (\bar{Y}\ |\ P = 0) $$ ] --- layout: false .box-4.medium[Every individual has a<br>treatment/causal effect] -- .box-inv-4.medium[ATE = average of all<br>unit-level causal effects] -- .box-inv-4.medium[ATE = Average effect<br>for the whole population] --- layout: true class: title title-4 --- # Other versions of causal effects .box-inv-4.medium[Average treatment on the treated] .box-4.sp-after[ATT/TOT] -- .box-inv-4.medium.sp-before[Conditional average treatment effect] .box-4[CATE] --- # Local effects <img src="10-slides_files/figure-html/bandwidth-plots-1.png" width="80%" style="display: block; margin: auto;" /> --- # LATE .box-inv-4.medium[Local average treatment effect (LATE) =<br>weighted ATE] .box-4.sp-after[Narrower effect; only applies to some of the population] -- .box-inv-4.medium[You can't make population-level<br>claims with LATE] -- .box-4.small[(But that can be okay!)] --- # LATE -- .box-inv-4.medium.sp-after[In RDD, LATE = people in the bandwidth] -- .box-inv-4.medium[In RCTs and IVs, LATE = **compliers**] --- # Compliance .pull-left[ .box-inv-4.less-medium[Complier] .box-4.small.sp-after[Treatment<br>follows assignment] .box-inv-4.less-medium[Always taker] .box-4.small[Gets treatment<br>regardless of assignment] ] -- .pull-right[ .box-inv-4.less-medium[Never taker] .box-4.small.sp-after[Rejects treatment<br>regardless of assignment] .box-inv-4.less-medium[Defier] .box-4.small[Does the opposite<br>of assignment] ] --- layout: false <figure> <img src="img/12/compliance-potential-outcomes.png" alt="Compliance and potential outcomes" title="Compliance and potential outcomes" width="100%"> </figure> --- layout: true class: title title-4 --- # Ignoring defiers -- .box-inv-4.medium[We can generally assume<br>that defiers don't exist] -- .box-4.small[In drug trials this makes sense; you can't get access<br>to medicine without being in treatment group] -- .box-4.small[In development it can make sense; in a bed net RCT,<br> a defier assigned to treatment would have to<br>tear down all existing bed nets out of spite] --- # Ignoring defiers -- .box-inv-4.medium[Monotonicity assumption] -- .box-4.small[Assignment to treatment only<br>has an effect in one direction] -- .box-4.small[Assignment to treatment can only<br>increase—not decrease—your actual chance of treatment] --- layout: false <figure> <img src="img/12/compliance-unknown.png" alt="Compliance and potential outcomes" title="Compliance and potential outcomes" width="100%"> </figure> --- layout: true class: title title-4 --- # More causal effects .box-inv-4.medium[Intent to treat (ITT)] .box-4.small.sp-after[Effect of assignment (not actual treatment!)] -- .center[ <figure> <img src="img/12/compliance-itt.png" alt="Compliance and ITT" title="Compliance and ITT" width="90%"> </figure> ] --- # More causal effects .box-inv-4.medium[Complier Average Causal Effect (CACE)] .box-4.small.sp-after[LATE for the compliers] -- .center[ <figure> <img src="img/12/compliance-cace.png" alt="Compliance and CACE" title="Compliance and CACE" width="90%"> </figure> ] --- # Hypothetical bed net program .box-inv-4[An NGO distributes mosquito bed nets to help<br>improve health by reducing malaria infection rate] -- .box-inv-4[We can read everyone's minds and we know if<br>people are always takers, never takers, or compliers] --- # Mind reading <img src="12-slides_files/figure-html/bed-nets-mind-reading-1.png" width="100%" style="display: block; margin: auto;" /> --- # Actual data .box-inv-4[But we can't read minds! This is what we actually see:] <img src="12-slides_files/figure-html/bed-nets-actual-1.png" width="100%" style="display: block; margin: auto;" /> --- # Actual data .box-inv-4[(Actually *this* is what we see)] <img src="12-slides_files/figure-html/bed-nets-actual-no-color-1.png" width="100%" style="display: block; margin: auto;" /> --- layout: false <img src="12-slides_files/figure-html/bed-nets-actual-smaller-1.png" width="70%" style="display: block; margin: auto;" /> .center[ <figure> <img src="img/12/compliance-reversed.png" alt="Compliance with graph" title="Compliance with graph" width="90%"> </figure> ] --- <img src="12-slides_files/figure-html/bed-nets-mind-reading-1.png" width="50%" style="display: block; margin: auto;" /> $$ `\begin{aligned} \text{ITT}\ =\ & \color{#0D0887}{\pi_\text{compliers} \times (\text{T} - \text{C})_\text{compliers}} + \\ &\color{#B7318A}{\pi_\text{always takers} \times (\text{T} - \text{C})_\text{always takers}} + \\ &\color{#FEBA2C}{\pi_\text{never takers} \times (\text{T} - \text{C})_\text{never takers}}\\[6pt] \text{ITT}\ =\ & \color{#0D0887}{\pi_\text{C} \text{CACE}} + \color{#B7318A}{\pi_\text{A} \text{ATACE}} + \color{#FEBA2C}{\pi_\text{N} \text{NTACE}} \end{aligned}` $$ --- <img src="12-slides_files/figure-html/bed-nets-mind-reading-1.png" width="50%" style="display: block; margin: auto;" /> `$$\text{ITT}\ =\ \color{#0D0887}{\pi_\text{C} \text{CACE}} + \color{#B7318A}{\pi_\text{A} \text{ATACE}} + \color{#FEBA2C}{\pi_\text{N} \text{NTACE}}$$` -- .box-4[Treatment received is same regardless of assignment!<br>Being assigned to treatment doesn't influence ATs and NTs] -- `$$\text{ITT}\ =\ \color{#0D0887}{\pi_\text{C} \text{CACE}} + \color{#B7318A}{\pi_\text{A} \times 0} + \color{#FEBA2C}{\pi_\text{N} \times 0}$$` --- $$ `\begin{aligned} \text{ITT}\ =\ & \color{#0D0887}{\pi_\text{C} \text{CACE}} + \color{#B7318A}{\pi_\text{A} \text{ATACE}} + \color{#FEBA2C}{\pi_\text{N} \text{NTACE}} \\[6pt] =\ & \color{#0D0887}{\pi_\text{C} \text{CACE}} + \color{#B7318A}{\pi_\text{A} \times 0} + \color{#FEBA2C}{\pi_\text{N} \times 0}\\[6pt] \text{ITT}\ =\ &\color{#0D0887}{\pi_\text{C} \text{CACE}} \end{aligned}` $$ -- .medium[ $$ \color{#0D0887}{\text{CACE}} = \frac{\text{ITT}}{\color{#0D0887}{\pi_\text{C}}} $$ ] -- .box-4[ITT and π<sub>C</sub> are both findable!] --- layout: true class: title title-4 --- # Finding the ITT .box-inv-4[ITT = effect of assignment to treatment on outcome] `$$\text{ITT} = (\bar{y}\ |\ \text{Treatment}) - (\bar{y}\ |\ \text{Control)}$$` -- .pull-left.small-code[ ```r bed_nets %>% group_by(treatment) %>% summarize(avg = mean(health)) ``` ``` ## # A tibble: 2 × 2 ## treatment avg ## <chr> <dbl> ## 1 Control 40.9 ## 2 Treatment 46.9 ``` ] -- .pull-right.small-code[ ```r itt_model <- lm(health ~ treatment, data = bed_nets) tidy(itt_model) ``` ``` ## # A tibble: 2 × 2 ## term estimate ## <chr> <dbl> ## 1 (Intercept) 40.9 ## 2 treatmentTreatment 5.99 ``` ] --- # Finding the π<sub>C</sub> .box-inv-4.smaller[People in treatment group who complied are a combination of Always Takers and Compliers] <img src="12-slides_files/figure-html/bed-nets-actual-smaller-1.png" width="50%" style="display: block; margin: auto;" /> $$ `\begin{aligned} \pi_\text{A} + \pi_\text{C} =& \text{% yes in treatment; or} \\ \pi_\text{C} =& \text{% yes in treatment} - \pi_\text{A} \end{aligned}` $$ --- # Can we know π<sub>A</sub>? `$$\pi_\text{C} = \text{% yes in treatment} - \pi_\text{A}$$` <img src="12-slides_files/figure-html/bed-nets-actual-smaller-1.png" width="50%" style="display: block; margin: auto;" /> -- .box-inv-4.small[We can assume that the proportion of Always Takers<br>is the same across treatment and control] -- .box-inv-4.small[We know how many people were in control but still used nets—that's π<sub>A</sub>!] --- # Isolating π<sub>C</sub> .small[ $$ `\begin{aligned} \pi_\text{C} =& \text{% yes in treatment} - \pi_\text{A} \\ =& \text{% yes in treatment} - \text{% yes in control} \end{aligned}` $$ ] .pull-left.small-code.small[ ```r bed_nets %>% group_by(treatment, bed_net) %>% summarize(n = n()) %>% mutate(prop = n / sum(n)) ``` ``` ## # A tibble: 4 × 4 ## # Groups: treatment [2] ## treatment bed_net n prop ## <chr> <fct> <int> <dbl> ## 1 Control No bed net 808 0.805 ## 2 Control Bed net 196 0.195 ## 3 Treatment No bed net 388 0.390 ## 4 Treatment Bed net 608 0.610 ``` ] -- .pull-right.small-code[ ```r # pi_c = prop yes in treatment - # prop yes in control pi_c <- 0.6104418 - 0.1952191 pi_c ``` ``` ## [1] 0.4152227 ``` .box-inv-4[41.5% compliers!] ] --- # Finding the CACE, finally! `$$\text{CACE} = \frac{\text{ITT}}{{\pi_\text{C}}}$$` -- .pull-left.small-code.small[ ```r ITT <- tidy(itt_model) %>% filter(term == "treatmentTreatment") %>% pull(estimate) ITT ``` ``` ## [1] 5.987992 ``` ```r pi_c ``` ``` ## [1] 0.4152227 ``` ] -- .pull-right.small-code[ ```r CACE <- ITT / pi_c CACE ``` ``` ## [1] 14.42116 ``` .box-inv-4.small[Bed nets *cause* 14.4 point<br>increase in health for compliers] ] --- layout: false .medium[ $$ \text{CACE} = \frac{\color{#FF4136}{\text{ITT}}}{\color{#B10DC9}{\pi_\text{C}}} $$ $$ \color{#FF4136}{\text{ITT}} = (\bar{y}\ |\ \text{Treatment}) - (\bar{y}\ |\ \text{Control)} $$ $$ `\begin{aligned} \color{#B10DC9}{\pi_\text{C}}\ =\ & \text{% yes in treatment} - \\ & \text{% yes in control} \end{aligned}` $$ ] --- class: title title-4 # A faster way with 2SLS .box-inv-4.medium[LATE for the compliers] -- .box-4[If you use assignment to treatment as an instrument,<br>you can find the causal effect for just compliers] -- .box-4[Instrumental variables in general give you the CACE] --- class: title title-4 # CACE with 2SLS .code-small[ ```r model_2sls <- iv_robust(health ~ bed_net | treatment, data = bed_nets) tidy(model_2sls) ``` ``` ## term estimate std.error statistic p.value ## 1 (Intercept) 38.12285 0.5150818 74.01320 0.000000e+00 ## 2 bed_netBed net 14.42116 1.2538198 11.50178 1.086989e-29 ``` ] .box-inv-4[Same 14.421 effect!] --- layout: false name: encouragement class: center middle section-title section-title-1 animated fadeIn # Promotion<br>as an instrument --- layout: true class: title title-1 --- # Universal programs .box-inv-1.medium[What if you have a program<br>that anyone can opt in to?] -- .box-1[ACA, voting, employer retirement matching] -- .pull-left[ .box-inv-1.small[You can't just look at outcomes<br>of participants vs. non-participants!] .box-1.small[Selection bias!] ] -- .pull-right[ .box-inv-1.small[You can't randomly<br>assign people to it either] .box-1.small[Ethics!] ] --- # Randomized promotion .box-inv-1.medium.sp-after[What if you *encourage*<br>some people to participate?] -- .box-inv-1.medium[What if the encouragement is randomized?] -- .box-1.medium[Valid treatment/control groups?] -- .box-1[Not really…] --- # Randomized promotion -- .box-1.medium.sp-after[…but also, kind of!] -- .box-inv-1.medium[Encouragement/promotion =<br> an instrument!] --- # Not something weird? Does that work!? -- .pull-left[ .box-inv-1.less-medium[Relevant?] .box-inv-1.tiny.sp-after[Z → X   Cor(Z, X) ≠ 0] .box-1.small[Promotion causes people<br>to use the program. Yep.] ] -- .pull-right.sp-after-half[ .box-inv-1.less-medium[Exclusive?] .box-inv-1.tiny.sp-after[Z → X → Y   Z ↛ Y   Cor(Z, Y | X) = 0] .box-1.small[Promotion causes outcome<br>*only through* program? Yep.] ] -- .box-inv-1.less-medium[Exogenous?] .box-inv-1.tiny.sp-after[U ↛ Z   Cor(Z, U) = 0] .box-1.small[Unobserved things that influence outcome don't also influence promotion?<br>Yep.] --- # Program compliance .pull-left[ .box-inv-1.medium[Always Takers] .box-1.small[People who will always<br>enroll in program] ] -- .pull-right.sp-after[ .box-inv-1.medium[Never Takers] .box-1.small[People who will never<br>enroll in program] ] -- .box-inv-1.medium[Compliers / Enrollers-if-Promoted] .box-1.small[People who will enroll in the program if encouraged to] --- # LATE for compliers .tiny[ <table> <thead> <tr> <th style="text-align:center;"> id </th> <th style="text-align:center;"> outcome </th> <th style="text-align:center;"> program </th> <th style="text-align:center;"> promotion </th> </tr> </thead> <tbody> <tr> <td style="text-align:center;"> 1 </td> <td style="text-align:center;"> 45 </td> <td style="text-align:center;"> TRUE </td> <td style="text-align:center;"> TRUE </td> </tr> <tr> <td style="text-align:center;"> 2 </td> <td style="text-align:center;"> 55 </td> <td style="text-align:center;"> TRUE </td> <td style="text-align:center;"> FALSE </td> </tr> <tr> <td style="text-align:center;"> 3 </td> <td style="text-align:center;"> 52 </td> <td style="text-align:center;"> FALSE </td> <td style="text-align:center;"> FALSE </td> </tr> <tr> <td style="text-align:center;"> 4 </td> <td style="text-align:center;"> 39 </td> <td style="text-align:center;"> FALSE </td> <td style="text-align:center;"> TRUE </td> </tr> </tbody> </table> ] -- .code-small.center[ ```r iv_robust(outcome ~ program | promotion) ``` ] -- .box-inv-1.medium[This will show the LATE for promoted-ees!] -- .box-1.small[Says nothing about the effect of the program on Always Takers or Never Takers] --- layout: false name: fuzzy-rdd class: center middle section-title section-title-6 animated fadeIn # Fuzzy RDD --- layout: true class: title title-6 --- # Fuzzy discontinuities <img src="12-slides_files/figure-html/tutoring-fuzzy-1.png" width="100%" style="display: block; margin: auto;" /> --- # Fuzzy discontinuities .box-inv-6.medium.sp-after[Fuzzy discontinuities imply noncompliance] -- .box-inv-6.medium[Address noncompliance with<br>instrumental variables] --- # What do we use as instrument? .box-inv-6.medium[Instrument = above/below cutoff] .box-6.small.sp-after[i.e. what they were supposed to do] -- .box-6.medium.sp-before[(This is just like the CACE we just did!)] --- # Not something weird? Does that work!? -- .pull-left[ .box-inv-6.less-medium[Relevant?] .box-inv-6.tiny.sp-after[Z → X   Cor(Z, X) ≠ 0] .box-6.small[Cutoff causes program? Yep.] ] -- .pull-right.sp-after-half[ .box-inv-6.less-medium[Exclusive?] .box-inv-6.tiny.sp-after[Z → X → Y   Z ↛ Y   Cor(Z, Y | X) = 0] .box-6.small[Cutoff causes outcome<br>*only through* program? Yep.] ] -- .box-inv-6.less-medium[Exogenous?] .box-inv-6.tiny.sp-after[U ↛ Z   Cor(Z, U) = 0] .box-6.small[Unobserved things that influence outcome don't also influence cutoff?<br>It's an arbitrary cutoff, so sure.] --- # Doubly local LATE .box-inv-6.medium[Effect is only for<br>(1) compliers (2) near the cutoff] .box-6[Be specific when talking about effects;<br>definitely don't make population-level claims] --- # Parametric fuzzy RD .box-inv-6[Step 1: Center running variable + make threshold variable] .small-code[ ```r tutoring_centered <- tutoring %>% mutate(entrance_centered = entrance_exam - 70, below_cutoff = entrance_exam <= 70) head(tutoring_centered, 6) ``` ``` ## # A tibble: 6 × 6 ## id entrance_exam tutoring exit_exam entrance_centered below_cutoff ## <int> <dbl> <lgl> <dbl> <dbl> <lgl> ## 1 1 92.4 FALSE 78.1 22.4 FALSE ## 2 2 72.8 FALSE 58.2 2.77 FALSE ## 3 3 53.7 TRUE 62.0 -16.3 TRUE ## 4 4 98.3 FALSE 67.5 28.3 FALSE ## 5 5 69.7 TRUE 54.1 -0.288 TRUE ## 6 6 68.1 TRUE 60.1 -1.93 TRUE ``` ] --- # Parametric fuzzy RD .box-inv-6[Step 2: Use cutoff as instrument in 2SLS model] .small-code[ ```r # Bandwidth ± 10 fuzzy1 <- iv_robust( exit_exam ~ entrance_centered + tutoring | entrance_centered + below_cutoff, data = filter(tutoring_centered, entrance_centered >= -10 & entrance_centered <= 10) ) tidy(fuzzy1) ``` ``` ## term estimate std.error statistic p.value ## 1 (Intercept) 60.1413558 1.01765573 59.097939 9.746624e-200 ## 2 entrance_centered 0.4366281 0.09929619 4.397229 1.407213e-05 ## 3 tutoringTRUE 9.7410444 1.91184891 5.095091 5.384163e-07 ``` ] --- # Nonparametric fuzzy RD .box-inv-6[Use the `fuzzy` argument in `rdrobust()`] .box-6.small[Important! Specify actual treatment status,<br>*not* the instrument of above/below the cutoff] .small-code[ ```r rdrobust(y = tutoring$exit_exam, x = tutoring$entrance_exam, c = 70, fuzzy = tutoring$tutoring) %>% summary() ``` ``` ## First-stage estimates. ## ## ============================================================================= ## Method Coef. Std. Err. z P>|z| [ 95% C.I. ] ## ============================================================================= ## Conventional -0.708 0.073 -9.751 0.000 [-0.850 , -0.565] ``` ]