Elwert Sample Slides IV - Statistical Horizons · Elwert Sample_Slides IV Author: OldFelix Created...

16
Instrumental Variables Felix Elwert, Ph.D. Upcoming Seminar: October 27-28, 2017, Philadelphia, Pennsylvania

Transcript of Elwert Sample Slides IV - Statistical Horizons · Elwert Sample_Slides IV Author: OldFelix Created...

Page 1: Elwert Sample Slides IV - Statistical Horizons · Elwert Sample_Slides IV Author: OldFelix Created Date: 20170412150244Z ...

Instrumental Variables Felix Elwert, Ph.D.

Upcoming Seminar: October 27-28, 2017, Philadelphia, Pennsylvania

Page 2: Elwert Sample Slides IV - Statistical Horizons · Elwert Sample_Slides IV Author: OldFelix Created Date: 20170412150244Z ...

Elwert'©'

1

!!

Instrumental!Variables!Analysis!!

Felix!Elwert,!Ph.D.!University!of!Wisconsin9Madison!!

E9mail:[email protected]!!

Statistical!Horizons!!

11Sample!Slides—!!!!! !

Elwert'©'

2

!!

!!!!!

Motivation!&!Outline!! !

Page 3: Elwert Sample Slides IV - Statistical Horizons · Elwert Sample_Slides IV Author: OldFelix Created Date: 20170412150244Z ...

Elwert'©'

3

!!

Wouldn’t!It!Be!Nice!!Wouldn’t!it!be!nice!to!have!answers?!!

• Is!military!service!an!engine!of!economic!mobility?!!• Does!an!additional!year!of!schooling!pay!off!in!the!labor!market?!

!• What!good!are!randomized!trials!when!patients!refuse!treatment?!

!• Does!my!weight!gain!make!you!fat?!

!!!These!are!causal!questions.!!! !

Elwert'©'

4

Answering!Causal!Questions!is!Difficult!!Observed!correlations!rarely!answer!causal!questions,!because!they!are!confounded!by!unobserved!factors.!!!

• Is!military!service!an!engine!of!economic!mobility?!o Military!service!is!selective!of!unobserved!dimensions!of!physical!and!mental!health.!!

!• Does!an!additional!year!of!schooling!pay!off!in!the!labor!market?!

o Schooling!and!wages!are!selective!of!unobserved!ability.!!!• What!good!are!randomized!trials!when!patients!refuse!their!treatment?!

o Patients!who!refuse!may!have!their!reasons.!!!• Does!my!weight!gain!make!you!fat?!

o Birds!of!a!feather!sing!together.!!! !

Page 4: Elwert Sample Slides IV - Statistical Horizons · Elwert Sample_Slides IV Author: OldFelix Created Date: 20170412150244Z ...

Elwert'©'

5

The!Promise!of!Instrumental!Variables!(IV)!!IV!is!a!method!to!extract!causal!information!from!observational!data!with!unobserved!confounding.!!

o Goal:!Estimate!the!causal!effect!of!one!or!more!treatments,!!,!on!an!outcome,!!!

!o Problem:!Treatments!may!be!correlated!with!the!error!term!(e.g.!due!to!omitted!variables,!measurement!error,!etc.),!which!biases!regression.!!

!o Solution:!Exploit!exogenous!variation!using!instrumental!variables!to!“reconstruct”!a!randomized!experiment!within!the!observational!study!(IV=“quasi9experiment”)!

!o Reward:!More!defensible!causal!claims!

!o Price:!Different!untestable!assumptions!about!the!data!generating!process,!and!large!standard!errors.!! !

Elwert'©'

6

What’s!Difficult—What’s!Not!!!For!the!most!part,!programming!IV!in!Stata!or!R!isn’t!too!difficult.!!!!!The!real!challenge!lies!in!knowing!when!the!assumptions!that!justify!IV!estimation!are!met!in!real!applications.!!!

! !

Page 5: Elwert Sample Slides IV - Statistical Horizons · Elwert Sample_Slides IV Author: OldFelix Created Date: 20170412150244Z ...

Elwert'©'

7

Same!Fruit,!Different!Flavors!!We’ll!cover!various!flavors!of!IV!analysis!that!are!distinguished!by!the!assumptions!they!make.!!!We!will!start!with!strong!assumptions!(e.g.,!linearity).!Later,!we!will!relax!assumptions!(e.g.,!permit!effect!heterogeneity).!!

• Cover!the!same!ground!repeatedly,!making!different!assumptions!!Relaxing!assumptions!is!costly:!!!

• Fewer!assumptions!"!weaker!conclusions.!• No!assumptions!"!no!conclusions!!

Ex:!Under!the!assumption!of!linearity!and!constant!effects,!IV!recovers!the!average!causal!treatment!effect!(ATE).!Under!non9constant!effects!(effect!heterogeneity),!IV!at!best!estimates!causal!effects!for!latent!subgroups!of!the!population!(LATE)!and!often!fails!to!identify!any!sort!of!causal!effect!for!anybody.! !

Elwert'©'

8

Course!Approach!!We!will!mingle!theoretical!exposition!with!empirical!illustrations!and!practical!exercises!!!

Some!using!StataTM,!some!using!Pencil!&!PaperTM!!!Please!ask!questions!at!any!time.!!! !

Page 6: Elwert Sample Slides IV - Statistical Horizons · Elwert Sample_Slides IV Author: OldFelix Created Date: 20170412150244Z ...

Elwert'©'

9

Outline!!Motivation!and!Outline!

1.!Preliminaries:!linear!models!Linear!IV:!Just1Identified!Models!! 2.!IV:!problem!and!solution!! 3.!Real!Example:!Angrist’s!draft!lottery!! 4.!Instrumental!variables!in!Stata!! 5.!Understanding!exclusion!violations!! 6.!Real!Example:!Angrist!&!Krueger’s!quarter!of!birth!IV!! 7.!Important!little!known!facts!! 8.!How!to!find!good!instruments!Linear!Instrumental!Variables:!Over1Identified!Models!! 9.!Overview!of!estimation!approaches:!IV,!2SLS,!GMM,!LIML!! 10.!IV!and!2SLS!! 11.!Finding!and!creating!multiple!IVs!! 12.!GMM:!getting!standard!errors!right!! 13.!Testing!and!correcting!IV!assumptions!! 14.!Extended!exercise:!Trounstine’s!rivers!!! 15.!IV!for!measurement!error!Nonlinear!IV:!Effect!Heterogeneity!and!LATE!

Elwert'©'

10

!

!!!

2.!IV:!Problem!and!Solution!! !

Page 7: Elwert Sample Slides IV - Statistical Horizons · Elwert Sample_Slides IV Author: OldFelix Created Date: 20170412150244Z ...

Elwert'©'

11

The!Problem:!Treatment!Correlates!with!the!Error!Term!(1)!!Here’s!the!problem!that!IV!aims!to!solve:!Suppose!we!have!a!linear!structural!model!(DGP)!with!a!constant!causal!effect!!!of!treatment!!!on!outcome!!!and!standardized!variables.!Further!suppose!that!T!and!Y!are!correlated!via!their!error!terms.!!! ! Without!Covariates! ! ! ! ! With!Covariates!!! !!!!!! ! !!" = !!" = ! + !!"!! !!".! = !!"!!!"!!"

!!!!!"= !!!"!!!"! !!!"!!!!" !

!!!! !

!

! ! = (!!!!") !!!!!!!! = ! + !!"!!

!Either!way,!error!correlation!between!T!and!Y!biases!OLS!regression.!!

Elwert'©'

12

The!Problem:!Treatment!Correlates!with!the!Error!Term!(2)!!Here’s!the!same!argument!with!algebra!and!terminology.!!!!!! = !!! + !!",!! ! (1)! ! ! ! (Structural!equation)!!!!!! = !!!! + !!!!"! ! ! ! ! (multiply!both!sides!by!!!)!!![!!!!] = !![!!!] + ![!!!!"]! ! ! (take!expectations,!pull!out!the!constant!!)!!!"#[!! ,!!] = !!"#[!!] + !"#[!! , !!"]! (because!variables!are!standardized)!!!"#[!! ,!!]!"#[!!]

= ! + !"#[!! , !!"]!"#[!!]!

!OLS!is!biased!if!treatment!correlates!with!the!error!term,!!"# !! , !!" ≠ 0.!Reason!for!this!correlation!may!include!omitted!variables,!measurement!error!in!T,!simultaneity,!and!others.!!!

Page 8: Elwert Sample Slides IV - Statistical Horizons · Elwert Sample_Slides IV Author: OldFelix Created Date: 20170412150244Z ...

Elwert'©'

13

In!Other!Words!!The!problem!of!!"# !! , !!" ≠ 0!is!the!age!old!problem!that!correlation!does!not!necessarily!equal!causation,!!"#[!! ,!!] ≠ !.!!

!Source:!http://www.tylervigen.com!! !

Elwert'©'

14

Instrumental!Variables!Solution!!Here’s!one!solution!to!the!problem!of!!"# !! , !!" ≠ 0.!!!Suppose!that!there!is!a!variable,!!!,!that!is!associated!with!treatment,!!!

!! = !!! + !!",!with!! ≠ 0,! (A.1:!“relevance”!or!“existence!of!the!first!stage”)!

!and!is!uncorrelated!with!the!error!term!in!the!structural!equation,!!! ! !"# !! , !!" = 0.!! ! ! ! (A.2:!“exclusion”)!!If!Z!meets!assumptions!A.1!and!A.2,!then!!!is!called!an!instrumental!variable.!!! !

Page 9: Elwert Sample Slides IV - Statistical Horizons · Elwert Sample_Slides IV Author: OldFelix Created Date: 20170412150244Z ...

Elwert'©'

15

Under!assumptions!A.1!and!A.2,!one!can!solve!the!structural!equation!(1)!for!!,!!!!! = !!! + !!"! ! ! ! ! ! (1)! (structural!equation)!!!!!! = !!!!! + !!!!"! ! ! ! ! ! (multiply!by!!!)!!![!!!!] = !"[!!!!] + ![!!!!"]!! ! ! (take!the!expectation)!!!"#[!! ,!!] = !"#$[!!,!!] + !"#[!!!!"]! (standardize!variables)!!!"#[!! ,!!]!"#[!!,!!]

= ! + !"#[!!!!!]!"#[!!,!!]!!!!!!!!!!!!!!!! 3 !!!!!(by!A. 1)!

!Key!move:!by!exclusion!(A.2),!Z!does!not!correlate!with!the!error!term.!Therefore,!!!"#[!!!!]!"#[!!!!]

= ! = !!"!!The!instrumental!variables!estimator!is!consistent,!lim!→! !!" = !.!

Elwert'©'

16

Making!Sense!of!the!Math!!That’s!pretty!much!it!for!mathematical!exposition.!!!The!hard!part!is!understanding!the!substantive!meaning!of!the!two!identifying!assumptions.!!For!the!most!part,!we!can!understand!IV!in!the!simplest!setting!of!one!endogenous!variable,!!,!and!one!exogenous!instrument,!!,!(just9identified!case).!!!I’m!going!to!suppress!subscripts!i!until!we!need!them!again!much!later.!!!!! !

Page 10: Elwert Sample Slides IV - Statistical Horizons · Elwert Sample_Slides IV Author: OldFelix Created Date: 20170412150244Z ...

Elwert'©'

17

Recap!Assumptions:!Instrument!Relevance!and!Exclusion!!

!"#[!,!]!"#[!,!] = ! + !"#[!, !!]!"#[!,!] !!!!!!!!!(3)!

!Inspecting!equation!(3)!drives!home!why!we!need!the!two!IV!assumptions:!!!A.1! The!instrument!must!be!associated!with!treatment,!!"#(!,!) !≠ !0,!because!

otherwise!we’re!dividing!by!0.!This!assumption!is!called!“instrument!relevance”!or!“existence!of!the!first!stage.”!Instrument!relevance!is!testable.!!!

A.2! The!instrument!must!not!be!associated!with!the!outcome!via!any!path!other!than!those!leading!through!T;!otherwise!!"#(!, !!) !≠ !0,!which!would!bias!the!estimator.!This!assumption!is!called!the!“exclusion!restriction.”!Instrument!exclusion!is!not!(usually)!testable!in!just9identified!models.!

!Instrument!relevance!and!exclusion!have!long!been!known!as!the!central!IV!assumptions.!

!

Elwert'©'

18

The!Key!Assumptions!Stay!The!Same!!

!There!exist!several!different!IV!estimators,!e.g.,!IV,!2SLS,!GMM,!LIML.!!All!IV!estimators!make!these!two!key!substantive!assumptions:!!!

A.1.!! Relevance!!!A.2.!! Exclusion!

!! !

Page 11: Elwert Sample Slides IV - Statistical Horizons · Elwert Sample_Slides IV Author: OldFelix Created Date: 20170412150244Z ...

Elwert'©'

19

Another!Requirement:!Instrument!Strength!!There’s!sort!of!a!third!assumption!(really!an!amplification!of!instrument!relevance):!!

!"#[!,!]!"#[!,!] = ! + !"#[!, !!]!"#[!,!] !!!!!!!!!(3)!

!Not!only!must!the!instrument!be!relevant,!!"#(!,!) ≠ 0,!but!the!correlation!should!be!really!strong.!If!!"#(!,!)!is!small,!then!even!small!violations!of!exclusion,!!"#(!, !!) !≠ !0,!would!be!amplified!(because!we’re!dividing!it!by!something!small),!thus!causing!serious!bias.!!!!This!requirement!is!often!called!a!“strong!first!stage”!or!“strong!instrument.”!! !

Elwert'©'

20

!!!!

3.!Real!Example:!Angrists’s!(1990)!Draft!Lottery!

!

! !

Page 12: Elwert Sample Slides IV - Statistical Horizons · Elwert Sample_Slides IV Author: OldFelix Created Date: 20170412150244Z ...

Elwert'©'

21

Angrists’s!(1990)!Draft!Lottery!!

!Example:!The!effect!of!military!service!on!lifetime!earnings!(Angrist!1990)!

!Z:!Vietnam!draft!lottery! ! T:!Military!service!!Y:!Civilian!earnings! ! ! U:!physical!&!mental!fitness,!etc.!

!Question:!What!is!the!effect!of!military!service!on!civilian!earnings!Problem:!Soldiers!are!(positively)!selective!of!the!population.!!!Setup:!During!the!Vietnam!War,!government!held!5!lotteries!to!determine!draft!eligibility.!The!lottery!randomly!assigned!a!number!to!each!birthday.!High!numbers!meant!no!draft,!low!numbers!meant!draft.!Draft!thresholds!(e.g.,!1970:!195)!were!announced!after!the!drawing.!In!the!interim,!many!men!with!low!numbers!volunteered!before!the!announcement!to!garner!more!favorable!terms!of!service.!

Elwert'©'

22

Draft!Lottery:!Quasi1Experimental!Encouragement!Design!!

!!The!lottery!is!not!a!randomized!experiment!because!it!randomizes!draft!eligibility!(Z)!rather!than!actual!military!service!(T).!Nonetheless,!the!lottery!introduces!an!element!of!randomness!in!the!enlistment!process.!IV!exploits!this!randomness.!!!One!can!generally!think!of!an!IV!as!a!factor!that!introduces!some!random!variation!to!treatment.!IV!is!a!“quasi9experimental”!technique.!!

!In!medical!parlance,!the!draft!lottery!follows!an!“encouragement!design”—the!lottery!increases!the!probability!of!service,!i.e.,!it!encourages!treatment,!without!mandating!it.!

! !

Page 13: Elwert Sample Slides IV - Statistical Horizons · Elwert Sample_Slides IV Author: OldFelix Created Date: 20170412150244Z ...

Elwert'©'

23

Draft!Lottery:!Identification!!

!Z:!Vietnam!draft!lottery! ! T:!Military!service!!Y:!Civilian!earnings! ! ! U:!physical!&!mental!fitness,!etc.!

!The!DAG!shows!the!assumed!linear!and!homogenous!DGP.!!!This!model!meets!the!IV!assumptions!because!!!! A.1.!The!instrument!is!relevant:!! ≠ 0!!

A.2.!The!instrument!is!excluded—the!lottery!is!assumed!to!affect!civilian!earnings!only!via!its!effect!on!military!service!(we’ll!discuss!this!later).!

! !

Elwert'©'

24

!

!!The!effect!of!T!on!Y,!!,!is!not!non9parametrically!identifiable,!because!T!and!Y!are!confounded!by!the!unobserved!U.!!!

# That’s!the!original!problem!of!!"# !, ! ≠ 0![where!the!omitted!variable!!!is!absorbed!in!the!error!term!!].!!

!!!!

Page 14: Elwert Sample Slides IV - Statistical Horizons · Elwert Sample_Slides IV Author: OldFelix Created Date: 20170412150244Z ...

Elwert'©'

25

!!The!effect!of!Z!on!T,!however,!is!identified.!!!

# !"#(!,!)!"#(!) != !!is!the!linear!causal!effect!of!Z!on!T!(“first!stage”).!!

Similarly,!the!effect!of!Z!on!Y!is!identified,!too.!!!

# !"#(!,!)!"#(!) != !"!is!the!linear!causal!effect!of!Z!on!Y!(“reduced!form”).!

!Hence,!assuming!linearity!and!homogeneity,!we!can!solve!for!b:!!! ! !!" = !"#(!,!)

!"#(!,!) =!∗!! = !.! ! ! ! !

Elwert'©'

26

More!Terminology!!Econometric!terminology:!!!"# !,!!"# !,! = !"#$%"#!!"#$

!"#$%!!"#$% = !!!Medical!terminology:!!!"# !,!!"# !,! = !"#$"#!!"!!"#$%!!""#$%

!"#$%&'()*)"+!!""#$%! = !!!In!Angrist’s!example,!the!covariances!are!actually!causal!effects,!and!so,!!!"# !,!!"# !,! = !""#$%!!"!!!!"!!

!""#$%!!"!!!!"!! = !!!! !

Page 15: Elwert Sample Slides IV - Statistical Horizons · Elwert Sample_Slides IV Author: OldFelix Created Date: 20170412150244Z ...

Elwert'©'

27

Wald!Estimator!for!Binary!Instruments!!The!covariance!between!a!continuous!and!a!binary!variable!equals!the!difference!in!means.!!!For!binary!Z,!we!can!rewrite!the!standard!IV!estimator!(which!otherwise!can!take!all!kinds!of!variables)!as,!!! !

!!"! =!"# !,!!"# !,! = ! ! ! = 1 − ![!|! = 0]

! ! ! = 1 − ![!|! = 0]!!This!is!the!famous!Wald!(1940)!estimator!for!grouped!data.!!!! Why!“grouped!data”?!Because!we!only!need!four!sample!means!to!compute!it.!!This!formula!works!for!binary!and!for!continuous!Y!and!T.!!

E.g.,!if!T!is!binary,!! ! ! = 1 = ! ! = 1 ! = 1 .!!! !

Elwert'©'

28

Draft!Lottery:!Wald!Estimation!!

!!Z:!Vietnam!draft!lottery! ! T:!Military!service!!Y:!Civilian!earnings! ! ! U:!physical!&!mental!fitness,!etc.!

!Since!the!draft!lottery!example!takes!binary!Z!and!T,!we!can!use!the!Wald!estimator!!

!!"! =! ! ! = 1 − ![!|! = 0]! ! ! = 1 − ![!|! = 0]!

!!

Page 16: Elwert Sample Slides IV - Statistical Horizons · Elwert Sample_Slides IV Author: OldFelix Created Date: 20170412150244Z ...

Elwert'©'

29

!(Source:!Angrist!and!Pischke!2009!after!Angrist!1990)!

!!

!!"! =! ! ! = 1 − ! ! ! = 0! ! ! = 1 − ! ! ! = 0 = − 435.8. 159 = −2,741!$/!"#!!

!Exercise:!Compute!the!IV!estimate!for!the!effect!of!military!service!on!earnings!in!1969.!Draw!the!DAG!for!1969.!