-
Notifications
You must be signed in to change notification settings - Fork 26
/
c7.tex
1459 lines (1226 loc) · 47 KB
/
c7.tex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
\documentclass{beamer}
%\usepackage[table]{xcolor}
\mode<presentation> {
\usetheme{Boadilla}
% \usetheme{Pittsburgh}
%\usefonttheme[2]{sans}
\renewcommand{\familydefault}{cmss}
%\usepackage{lmodern}
%\usepackage[T1]{fontenc}
%\usepackage{palatino}
%\usepackage{cmbright}
\setbeamercovered{transparent}
\useinnertheme{rectangles}
}
\usepackage{multirow}
\usepackage{listings}
%\usepackage{normalem}{ulem}
%\usepackage{colortbl, textcomp}
\setbeamercolor{normal text}{fg=black}
\setbeamercolor{structure}{fg= black}
\definecolor{trial}{cmyk}{1,0,0, 0}
\definecolor{trial2}{cmyk}{0.00,0,1, 0}
\definecolor{darkgreen}{rgb}{0,.4, 0.1}
\usepackage{ifxetex,ifluatex}
\usepackage{array}
\beamertemplatesolidbackgroundcolor{white} \setbeamercolor{alerted
text}{fg=red}
\newtheorem{assumption}{Assumption}
\setbeamertemplate{caption}[numbered]\newcounter{mylastframe}
%\usepackage{color}
\usepackage{tikz}
\usetikzlibrary{arrows}
\usepackage{colortbl}
\usepackage{fancyvrb}
%\usepackage[usenames, dvipsnames]{color}
%\setbeamertemplate{caption}[numbered]\newcounter{mylastframe}c
%\newcolumntype{Y}{\columncolor[cmyk]{0, 0, 1, 0}\raggedright}
%\newcolumntype{C}{\columncolor[cmyk]{1, 0, 0, 0}\raggedright}
%\newcolumntype{G}{\columncolor[rgb]{0, 1, 0}\raggedright}
%\newcolumntype{R}{\columncolor[rgb]{1, 0, 0}\raggedright}
%\begin{beamerboxesrounded}[upper=uppercol,lower=lowercol,shadow=true]{Block}
%$A = B$.
%\end{beamerboxesrounded}}
\renewcommand{\familydefault}{cmss}
%\usepackage[all]{xy}
\usepackage{tikz}
\usepackage{lipsum}
\newenvironment{changemargin}[3]{%
\begin{list}{}{%
\setlength{\topsep}{0pt}%
\setlength{\leftmargin}{#1}%
\setlength{\rightmargin}{#2}%
\setlength{\topmargin}{#3}%
\setlength{\listparindent}{\parindent}%
\setlength{\itemindent}{\parindent}%
\setlength{\parsep}{\parskip}%
}%
\item[]}{\end{list}}
\usetikzlibrary{arrows}
%\usepackage{palatino}
%\usepackage{eulervm}
\usecolortheme{lily}
\newtheorem{com}{Comment}
\newtheorem{lem} {Lemma}
\newtheorem{prop}{Proposition}
\newtheorem{thm}{Theorem}
\newtheorem{defn}{Definition}
\newtheorem{cor}{Corollary}
\newtheorem{obs}{Observation}
\numberwithin{equation}{section}
\newtheorem{iass}{Identification Assumption}
\newtheorem{ires}{Identfication Result}
\newtheorem{estm}{Estimand}
\newtheorem{esti}{Estimator}
\newcommand{\indep}{{\bot\negthickspace\negthickspace\bot}}
%Box Types
\title[Causal Inference] % (optional, nur bei langen Titeln nötig)
{Causal Inference}
\author{Justin Grimmer}
\institute[University of Chicago]{Associate Professor\\Department of Political Science \\ University of Chicago}
\vspace{0.3in}
\date{April 25th, 2018}
\begin{document}
\begin{frame}
\titlepage
\end{frame}
\begin{frame}
\frametitle{Selection on Unobservables}
\begin{Problem}
Often there are reasons to believe that treated and untreated units differ in unobservable
characteristics that are associated with potential outcomes even
after controlling for differences in observed characteristics.\\\bigskip In
such cases, treated and untreated units are not directly comparable. What can we
do then?
\end{Problem}
\end{frame}
%\section{Motivating Example: The Mariel Boatlift}
\begin{frame}
\frametitle{Example: Minimum wage laws and employment}
\begin{itemize}
\item Do higher minimum wages decrease low-wage employment?\medskip
\item Card and Krueger (1994) consider impact of New Jersey's 1992 minimum wage increase from \$4.25 to \$5.05 per hour\medskip
\item Compare employment in 410 fast-food restaurants in
New Jersey and eastern Pennsylvania before and after the rise\medskip
\item Survey data on wages and employment from two waves:
\begin{itemize}
\item Wave 1: March 1992, one month before the minimum wage increase
\item Wave 2: December 1992, eight months after increase
\end{itemize}
\end{itemize}
\end{frame}
\begin{frame}
\frametitle{Locations of Restaurants (Card and Krueger 2000)}
\begin{center}
\includegraphics[height=3in,keepaspectratio=1]{CK1.pdf}
\end{center}
\end{frame}
\begin{frame}
\frametitle{Wages Before Rise in Minimum Wage}
\begin{center}
\includegraphics[height=3in,keepaspectratio=1]{CKbefore.pdf}
\end{center}
\end{frame}
\begin{frame}
\frametitle{Wages After Rise in Minimum Wage}
\begin{center}
\includegraphics[height=3in,keepaspectratio=1]{CKafter.pdf}
\end{center}
\end{frame}
%
%\begin{frame}
% \frametitle{Motivating Example: The Mariel Boatlift}
%\begin{itemize}
%\item How do inflows of immigrants affect the wages and employment of natives in local labor markets?\medskip
% \item Card (1990) uses the Mariel Boatlift of 1980 as a natural experiment
%to measure the effect of a sudden influx of immigrants on unemployment among less-skilled natives
%\end{itemize}
%\begin{overprint}
%\onslide<1>
%\begin{center}
% \includegraphics[height=1.8in,keepaspectratio=1]{Mariel1a.pdf}
%\end{center}
%\onslide<2>
%\begin{itemize}
%\medskip
%\item The Mariel Boatlift increased the Miami labor force by 7\%\medskip
%\item Individual-level data on unemployment
%from the Current Population Survey (CPS) for Miami and four
%comparison cities (Atlanta, Los Angeles, Houston and Tampa-St. Petersburg)
%\end{itemize}
%\end{overprint}
%\end{frame}
%
%\begin{frame}
% \frametitle{Motivating Example: The Mariel Boatlift}
%\begin{itemize}
%\item How do inflows of immigrants affect the wages and employment of natives in local labour markets?\bigskip
% \item Card (1990) uses the Mariel Boatlift of 1980 as a natural experiment
%to measure the effect of a sudden influx of immigrants on unemployment among less-skilled natives\bigskip
%\item The Mariel Boatlift increased the Miami labor force by 7\%\bigskip
%\item Individual-level data on unemployment
%from the Current Population Survey (CPS) for Miami and four
%comparison cities (Atlanta, Los Angeles, Houston and Tampa-St. Petersburg)
%\end{itemize}
%\end{frame}
%\begin{frame}
% \frametitle{The Mariel Boatlift}
%\begin{center}
% \includegraphics[height=2.9in,keepaspectratio=1]{Mariel1b.pdf}
%\end{center}
%\end{frame}
%
%\begin{frame}
% \frametitle{The Mariel Boatlift}
%\begin{center}
% \includegraphics[height=2.9in,keepaspectratio=1]{Mariel1a.pdf}
%\end{center}
%\end{frame}
\section{Difference-in-Differences: Setup}
\begin{frame}
\frametitle{Two Groups and Two Periods}
\begin{Definition}
Two groups:
\begin{itemize}
\item $D=1$ Treated units
\item $D=0$ Control units
\end{itemize}\medskip
Two periods:
\begin{itemize}
\item $T=0$ Pre-Treatment period
\item $T=1$ Post-Treatment period
\end{itemize}\medskip
Potential outcomes $Y_d(t)$:
\begin{itemize}
\item $Y_{1i}(t)$ potential outcome unit $i$ attains in period $t$ when treated between $t$ and $t-1$
\item $Y_{0i}(t)$ potential outcome unit $i$ attains in period $t$ with control between $t$ and $t-1$
\end{itemize}
\end{Definition}
\end{frame}
\begin{frame}
\frametitle{Two Groups and Two Periods}
\begin{Definition}
Causal effect for unit $i$ at time $t$ is
\begin{itemize}
\item $\tau_{it}=Y_{1i}(t)-Y_{0i}(t)$
\end{itemize}\medskip
Observed outcomes $Y_i(t)$ are realized as
\begin{itemize}
\item $Y_i(t)=Y_{0i}(t)\cdot (1-D_i(t))+Y_{1i}(t)\cdot D_i(t)$
\end{itemize}\medskip
Fundamental problem of causal inference:
\begin{itemize}
\item If $D$ occurs only after $t=0$ ($D_i=D_i(1)$ and $Y_i(0)=Y_{0i}(0)$) we have: $Y_i(1)=Y_{0i}(1)\cdot (1-D_i)+Y_{1i}(1)\cdot
D_i$
\end{itemize}
\end{Definition}
\begin{estm}[ATT]
Focus on estimating the average
effect of the treatment on the treated: $\tau_{ATT}=E[Y_{1}(1)-Y_{0}(1)|D=1]$
\end{estm}
\end{frame}
\begin{frame}
\frametitle{Two Groups and Two Periods}
\begin{estm}[ATT]
$\tau_{ATT}=E[Y_{1}(1)-Y_{0}(1)|D=1]$
\end{estm}
\begin{center}
\begin{tabular}{|c|c|c|}
\hline
{\bf } & {\bf Post-Period (T=1)} & {\bf Pre-Period (T=0)} \\
\hline
\multirow{2}{*}{Treated D=1} & \multirow{2}{*}{$E[Y_1(1)|D=1]$} & \multirow{2}{*}{$E[Y_0(0)|D=1]$} \\
& & \\
\hline
\multirow{2}{*}{Control D=0} & \multirow{2}{*}{$E[Y_0(1)|D=0]$} & \multirow{2}{*}{$E[Y_0(0)|D=0]$} \\
& & \\
\hline
\end{tabular}
\end{center}
\begin{overprint}
\onslide<1|handout:1>
\begin{problem}
Missing potential outcome: \textcolor{red}{$E[Y_0(1)|D=1]$}, ie. what is the average post-period outcome for the treated in the absence of the treatment?
\end{problem}
\onslide<2|handout:2>
Control Strategy: Before vs. After\begin{itemize}
\item Use: $E[Y(1)|D=1]-E[Y(0)|D=1]$
%\item Assumes: \textcolor{red}{$E[Y_0(1)|D=1]$}$=E[Y_0(0)|D=1]$
\end{itemize}
\onslide<3|handout:3>
Control Strategy: Before-After Comparison\begin{itemize}
\item Use: $E[Y(1)|D=1]-E[Y(0)|D=1]$
\item Assumes: \textcolor{red}{$E[Y_0(1)|D=1]$}$=E[Y_0(0)|D=1]$
\end{itemize}
\onslide<4|handout:4>
Control Strategy: Treated-Control Comparison in Post-Period\begin{itemize}
\item Use: $E[Y(1)|D=1]-E[Y(1)|D=0]$
%\item Assumes: \textcolor{red}{$E[Y_0(1)|D=1]$}$=E[Y_0(1)|D=0]$
\end{itemize}
\onslide<5|handout:5>
Control Strategy: Treated-Control Comparison in Post-Period\begin{itemize}
\item Use: $E[Y(1)|D=1]-E[Y(1)|D=0]$
\item Assumes: \textcolor{red}{$E[Y_0(1)|D=1]$}$=E[Y_0(1)|D=0]$
\end{itemize}
\onslide<6|handout:6>
Control Strategy: Difference-in-Differences (DD)\begin{itemize}\small
\item Use:\\$\Bigl\{ E[Y(1)|D=1]-E[Y(1)|D=0] \Bigr\}-$\\
$\Bigl\{ E[Y(0)|D=1]-E[Y(0)|D=0] \Bigr\}$
%\item Assumes: \textcolor{red}{$E[Y_0(1)-Y_0(0)|D=1]\,$}$=E[Y_0(1)-Y_0(0)|D=0]$
\end{itemize}
\onslide<7|handout:7>
Control Strategy: Difference-in-Differences (DD)\begin{itemize}\small
\item Use:\\$\Bigl\{ E[Y(1)|D=1]-E[Y(1)|D=0] \Bigr\}-$\\
$\Bigl\{ E[Y(0)|D=1]-E[Y(0)|D=0] \Bigr\}$
\item Assumes: \textcolor{red}{$E[Y_0(1)-Y_0(0)|D=1]\,$}$=E[Y_0(1)-Y_0(0)|D=0]$
\end{itemize}
\end{overprint}
\end{frame}
%\begin{frame}
% \frametitle{Graphical Representation: Difference-in-Differences}
%\begin{center}
% \includegraphics[height=2.7in,keepaspectratio=1]{did1.pdf}
%\end{center}
%\end{frame}
\begin{frame}
\frametitle{Graphical Representation: Difference-in-Differences}
\setlength{\unitlength}{1cm}
\hspace*{-1.5cm}\begin{picture}(8,6)(-4,-0.5)
\linethickness{0.5pt}
\thicklines
\put(0,0){\vector(1,0){7}}
\put(0,0){\vector(0,1){5.5}}
\put(1,0.5){\line(3,1){3.5}}
\put(1,2){\line(5,3){3.5}}
\put(1,0.5){\circle*{0.1}}
\put(1,2){\circle*{0.1}}
\put(4.5,1.663){\circle*{0.1}}
\put(4.5,4.1){\circle*{0.1}}
\put(1,-0.1){\line(0,1){0.2}}
\put(4.5,-0.1){\line(0,1){0.2}}
\put(0.6,-0.5){$t=0$}
\put(4.1,-0.5){$t=1$}
\thinlines
\multiput(0,0.5)(0.2,0){5}{\line(1,0){0.1}}
\multiput(0,2)(0.2,0){5}{\line(1,0){0.1}}
\multiput(0,1.663)(0.2,0){22}{\line(1,0){0.1}}
\multiput(0,4.1)(0.2,0){22}{\line(1,0){0.1}}
\put(-2.5,0.4){\small$E[Y(0)|D=0]$}
\put(-2.5,2){\small$E[Y(0)|D=1]$}
\put(-2.5,1.45){\small$E[Y(1)|D=0]$}
\put(-2.5,4){\small$E[Y(1)|D=1]$}
\onslide<2->\multiput(1,2)(0.6,0.2){6}{\line(3,1){0.4}}
\put(4.5,3.163){\circle{0.1}}
\onslide<3->
\multiput(0,3.163)(0.2,0){22}{\line(1,0){0.1}}
\put(-2.5,3.1){\small$E[Y_0(1)|D=1]$}
\onslide<4-> \thicklines
\put(4.5,3.25){\vector(0,1){0.8}}
\put(4.5,4){\vector(0,-1){0.75}}
\put(4.7,3.5){\small $E[Y_1(1)-Y_0(1)|D=1]$}
\end{picture}
\end{frame}
\section{Difference-in-Differences: Identification}
\begin{frame}
\frametitle{Identification with Difference-in-Differences}
\begin{iass}[parallel trends]
\textcolor{blue}{$E[Y_0(1)-Y_0(0)|D=1]=E[Y_0(1)-Y_0(0)|D=0]$}
\end{iass}
\begin{overprint}
\onslide<1|handout:1>
\begin{ires}
Given parallel trends the ATT is identified as:\\
\begin{eqnarray*}
E[Y_1(1)-Y_0(1)|D=1]&=&\Bigl\{ E[Y(1)|D=1]-E[Y(1)|D=0] \Bigr\}\\
&-&\Bigl\{ E[Y(0)|D=1]-E[Y(0)|D=0] \Bigr\}
\end{eqnarray*}
\end{ires}
\onslide<2|handout:2>
\scriptsize
\begin{Proof}
Note that the identification assumption implies
$\alert{E[Y_0(1)|D=0]} = E[Y_0(1)|D=1] - E[Y_0(0)|D=1] + E[Y_0(0)|D=0]$\\
plugging in we get
\begin{eqnarray*}
% \nonumber to remove numbering (before each equation)
& & \left\{ E[Y(1)|D=1]-E[Y(1)|D=0] \right\}
-\left\{ E[Y(0)|D=1]-E[Y(0)|D=0] \right\}\\
&=& \left\{ E[Y_1(1)|D=1]-\alert{E[Y_0(1)|D=0]} \right\}
-\left\{ E[Y_0(0)|D=1]-E[Y_0(0)|D=0] \right\} \\
&=& \left\{ E[Y_1(1)|D=1]- \left( E[Y_0(1)|D=1] - E[Y_0(0)|D=1] + E[Y_0(0)|D=0] \right) \right\} \\
&-& \left\{ E[Y_0(0)|D=1]-E[Y_0(0)|D=0] \right\}\\
&= & E[Y_1(1)- Y_0(1)|D=1] + \left\{ E[Y_0(0)|D=1] - E[Y_0(0)|D=0] \right\} \\
&-&\left\{ E[Y_0(0)|D=1]-E[Y_0(0)|D=0] \right\} \\
&=&E[Y_1(1)-Y_0(1)|D=1]
\end{eqnarray*}
\end{Proof}
\end{overprint}
\end{frame}
%\begin{footnotesize}
%\begin{eqnarray*}
%% \nonumber to remove numbering (before each equation)
% & & \left\{ E[Y(1)|D=1]-E[Y(1)|D=0] \right\}
% -\left\{ E[Y(0)|D=1]-E[Y(0)|D=0] \right\}\\
% &=& \left\{ E[Y_1(1)|D=1]-E[Y_0(1)|D=0] \right\}
% -\left\{ E[Y_0(0)|D=1]-E[Y_0(0)|D=0] \right\} \\
% & & \\
% & & \mbox{Now notice that Assumption \ref{assumption:id} implies:} \\
% & & E[Y_0(1)|D=0] = E[Y_0(1)|D=1] - E[Y_0(0)|D=1] + E[Y_0(0)|D=0]\\
% & & \mbox{plug into above and get:} \\
% & & \\
% &=& \left\{ E[Y_1(1)|D=1]- \left( E[Y_0(1)|D=1] - E[Y_0(0)|D=1] + E[Y_0(0)|D=0] \right) \right\}
% -\left\{ E[Y_0(0)|D=1]-E[Y_0(0)|D=0] \right\}\\
% &= & E[Y_1(1)- Y_0(1)|D=1] + \left\{ E[Y_0(0)|D=1] - E[Y_0(0)|D=0] \right\}
% -\left\{ E[Y_0(0)|D=1]-E[Y_0(0)|D=0] \right\} \\
% &=& E[Y_1(1)-Y_0(1)|D=1]
%\end{eqnarray*}
%\end{footnotesize}
\section{Difference-in-Differences: Estimation}
\begin{frame}
\frametitle{Difference-in-Differences: Estimators}
\begin{estm}[ATT]\vspace{-.15in}
\begin{eqnarray*}\small
E[Y_1(1)-Y_0(1)|D=1]&=&\Bigl\{ E[Y(1)|D=1]-E[Y(1)|D=0] \Bigr\}\\
&-&\Bigl\{ E[Y(0)|D=1]-E[Y(0)|D=0] \Bigr\}
\end{eqnarray*}
\end{estm}\vspace{-.05in}
%\pause
\begin{esti}[Sample Means: Panel]\small
\[
\left\{\frac{1}{N_1}\sum_{D_i=1} Y_i(1) -
\frac{1}{N_0}\sum_{D_i=0} Y_i(1)\right\} -
\left\{\frac{1}{N_1}\sum_{D_i=1} Y_i(0) -
\frac{1}{N_0}\sum_{D_i=0} Y_i(0)\right\}
\]
\[
=\left\{\frac{1}{N_1}\sum_{D_i=1} \{Y_i(1)-Y_i(0)\} -
\frac{1}{N_0}\sum_{D_i=0} \{Y_i(1)-Y_i(0)\}\right\},
\]
where $N_1$ and $N_0$ are the number of treated and control units respectively.
\end{esti}
\end{frame}
\begin{frame}
\frametitle{Sample Means: Minimum wage laws and employment}
\begin{center}
\includegraphics[height=2.4in,keepaspectratio=1]{CKresults1.pdf}
\end{center}
\end{frame}
\begin{frame}
\frametitle{Difference-in-Differences: Estimators}
\begin{esti}[Sample Means: Repeated Cross-Sections]\small
Let
$\{Y_i, D_i, T_i \}_{i=1}^n$ be the
pooled sample (the two different cross-sections merged) where $T$
is a random variable that indicates the period (0 or 1) in which the
individual is observed.\\\bigskip The difference-in-differences estimator is given by:
\begin{multline}
\left\{\frac{\sum D_i\cdot T_i\cdot Y_i}{\sum D_i\cdot T_i} -
\frac{\sum (1-D_i)\cdot T_i\cdot Y_i}{\sum (1-D_i)\cdot T_i}\right\}\\ -
\left\{\frac{\sum D_i\cdot(1-T_i)\cdot Y_i}{\sum D_i\cdot(1-T_i)} -
\frac{\sum (1-D_i)\cdot (1-T_i)\cdot Y_i}{\sum (1-D_i)\cdot (1-T_i)}\right\}\nonumber
%\label{equation:sdid}
\end{multline}
\end{esti}
\end{frame}
\begin{frame}
\frametitle{Difference-in-Differences: Estimators}
\begin{esti}[Regression: Repeated Cross-Sections]\small
Alternatively, the same estimator can be obtained using regression techniques.
Consider the linear model:
\[
Y = \mu + \gamma\cdot D + \delta\cdot T + \tau \cdot (D\cdot T) + \varepsilon,
\]
where $E[\varepsilon|D,T]=0$.
\end{esti}\medskip
\begin{overprint}
\onslide<1|handout:1>
Easy to show that $\tau$ estimates the DD effect:
\begin{eqnarray*}
\tau =&
\left\{
E[Y|D=1, T=1] - E[Y|D=0, T=1]
\right\}\\
-&
\left\{
E[Y|D=1, T=0] - E[Y|D=0, T=0]
\right\}
\end{eqnarray*}
\onslide<2|handout:2>
\begin{center}
\small
\begin{tabular}{|c|c|c|c|}
\hline
{\bf } & {\bf After (T=1)} & {\bf Before (T=0)} & {\bf After - Before} \\
\hline
\multirow{2}{*}{{\bf Treated D=1}} & \multirow{2}{*}{$\mu + \gamma + \delta + \tau$} & \multirow{2}{*}{$\mu + \gamma$} & \multirow{2}{*}{$\delta + \tau$} \\
& & & \\
\hline
\multirow{2}{*}{{\bf Control D=0}} & \multirow{2}{*}{$\mu + \delta$} & \multirow{2}{*}{$\mu$} & \multirow{2}{*}{$\delta$} \\
& & & \\
\hline
\multirow{2}{*}{{\bf Treated - Control}} & \multirow{2}{*}{$\gamma + \tau$} & \multirow{2}{*}{$\gamma$} & \multirow{2}{*}{$\tau$} \\
& & & \\
\hline
\end{tabular}
\end{center}
%Correct standard errors to account for temporal dependence!
\end{overprint}
\end{frame}
\begin{frame}[fragile]
\frametitle{Regression: Minimum wage laws and employment}
\footnotesize
\begin{lstlisting}[language=R, basicstyle=\ttfamily]
> d <- read.dta("CK1994_longformat.dta",convert.factors = FALSE)
> head(d[, c('ID', 'nj', 'postperiod', 'emptot')])
ID nj postperiod emptot
1 1 0 0 40.50
2 1 0 1 24.00
3 2 0 0 13.75
4 2 0 1 11.50
5 3 0 0 8.50
6 3 0 1 10.50
\end{lstlisting}
\end{frame}
\begin{frame}[fragile]
\frametitle{Regression: Minimum wage laws and employment}
\footnotesize
\begin{lstlisting}[language=R, basicstyle=\ttfamily]
with(d,
(
mean(emptot[nj == 1 & postperiod == 1], na.rm = TRUE) -
mean(emptot[nj == 1 & postperiod == 0], na.rm = TRUE)
) -
(mean(emptot[nj == 0 & postperiod == 1], na.rm = TRUE) -
mean(emptot[nj == 0 & postperiod == 0], na.rm = TRUE)
)
)
[1] 2.753606
\end{lstlisting}
\end{frame}
\begin{frame}[fragile]
\frametitle{Regression: Minimum wage laws and employment}
\footnotesize
\begin{verbatim}
> ols <- lm(emptot ~ postperiod * nj, data = d)
> coeftest(ols)
t test of coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 23.3312 1.0719 21.7668 < 2e-16 ***
postperiod -2.1656 1.5159 -1.4286 0.15351
nj -2.8918 1.1935 -2.4229 0.01562 *
postperiod:nj 2.7536 1.6884 1.6309 0.10331
\end{verbatim}
Note: Should adjust standard errors to account for temporal dependence
\end{frame}
%\begin{frame}[fragile]
% \frametitle{Regression: Minimum wage laws and employment}
%
%\footnotesize
%\begin{verbatim}
%
%library(plm)
%library(lmtest)
%> # define panel data
%> d <- plm.data(d, indexes = c("ID", "postperiod"))
%
%> # run DID regression
%> did.reg <- plm(emptot ~ postperiod * nj, data = d,
% model = "pooling")
%
%> # get clustered SEs
%> coeftest(did.reg, vcov=function(x)
% vcovHC(x, cluster="group", type="HC1"))
%
%t test of coefficients:
%
% Estimate Std. Error t value Pr(>|t|)
%(Intercept) 23.3312 1.3457 17.3370 < 2e-16 ***
%postperiod1 -2.1656 1.2173 -1.7790 0.07562 .
%nj -2.8918 1.4387 -2.0100 0.04477 *
%postperiod1:nj 2.7536 1.3058 2.1087 0.03529 *
%\end{verbatim}
%
%\end{frame}
\begin{frame}
\frametitle{Difference-in-Differences: Estimators}
\begin{esti}[Regression: Repeated Cross-Sections]\small
Can use regression version of the DD estimator
to include covariates:
\[
Y = \mu + \gamma\cdot D + \delta\cdot T + \tau \cdot (D\cdot T) + X'\beta + \varepsilon.
\]\vspace*{-0.5cm}
\begin{itemize}
\item introducing time-invariant $X$'s is not helpful (they get differenced-out)
\item be careful with time-varying $X$'s: they are often affected by the treatment and may introduce endogeneity (e.g. price of meal)
\item always correct standard errors to account for temporal dependence
\end{itemize}
Can interact time-invariant
covariates with the time indicator:
\begin{equation}
Y = \mu + \gamma\cdot D + \delta\cdot T + \alpha\cdot (D\cdot T) + X'\beta_0 + (T\cdot X')\beta_1 +\varepsilon \nonumber
%\label{equation:tvdid}
\end{equation}
\end{esti}
$\Rightarrow$ $X$ is used to explain differences in trends.
\end{frame}
\begin{frame}
\frametitle{Difference-in-Differences: Estimators}
\begin{esti}[Regression: Panel Data]\small
With panel data we can estimate the difference-in-differences effect using a fixed effects regression with unit and period fixed effects:
\[
Y_{it} = \mu + \gamma_i + \delta T + \tau D_{it} + X'_{it}\beta + \varepsilon_{it}
\]\vspace*{-0.5cm}
\begin{itemize}
\item One intercept for each unit $\gamma_i$
\item $D_{it}$ coded as 1 for treated in post-period and 0 otherwise
%\item Correct standard errors to account for temporal dependence
\end{itemize}
Or equivalently we can use regression with the dependent variable in first differences:
\[
\Delta Y_i = \delta + \tau \cdot D_i + u_i,
\]
where $\Delta Y_i = Y_i(1)-Y_i(0)$ and $u_i=\Delta \varepsilon_i$.\\\bigskip
%\begin{itemize}
%\item Often helps with temporal dependence.
%\item With two periods this gives the same result as other regressions
%\end{itemize}
%$\Rightarrow$ Can also add $X$ to explain differences in trends.
\end{esti}
\end{frame}
\begin{frame}[fragile]
\frametitle{Regression: Minimum wage laws and employment}
\footnotesize
\begin{verbatim}
library(plm)
library(lmtest)
> d$Dit <- d$nj * d$postperiod
> d <- plm.data(d, indexes = c("ID", "postperiod"))
> did.reg <- plm(emptot ~ postperiod + Dit, data = d,
model = "within")
> coeftest(did.reg, vcov=function(x)
vcovHC(x, cluster="group", type="HC1"))
t test of coefficients:
Estimate Std. Error t value Pr(>|t|)
postperiod1 -2.2833 1.2465 -1.8319 0.06775 .
Dit 2.7500 1.3359 2.0585 0.04022 *
\end{verbatim}
\end{frame}
%\begin{frame}[fragile]
%\begin{verbatim}
%library(plm)
%library(lmtest)
%> ck_data <- plm.data(ck_data, indexes = c("ID", "postperiod"))
%> fixed.mod <- (plm(emptot ~ postperiod * nj, data = ck_data,
% model = "within"))
%> coeftest(fixed.mod, vcov=function(x)
% vcovHC(x, cluster="group",
% type="HC1"))
%
%t test of coefficients:
%
% Estimate Std. Error t value Pr(>|t|)
%postperiod1 -2.2833 1.2465 -1.8319 0.06775 .
%postperiod1:nj 2.7500 1.3359 2.0585 0.04022 *
%---
%Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
%\end{verbatim}
%
%\end{frame}
\begin{frame}[fragile]
\frametitle{Regression: Minimum wage laws and employment}
\footnotesize
\begin{verbatim}
> firstdiff.mod <- plm(emptot ~ postperiod * nj,
data = d, model = "fd")
> coeftest(firstdiff.mod, vcov=function(x) vcovHC(x, type="HC0"))
t test of coefficients:
Estimate Std. Error t value Pr(>|t|)
postperiod1 -2.2833 1.2465 -1.8319 0.06775 .
postperiod1:nj 2.7500 1.3359 2.0585 0.04022 *
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
\end{verbatim}
\end{frame}
\section{Difference-in-Differences: Threats to Validity}
\begin{frame}
\frametitle{Difference-in-Differences: Threats to Validity}
\begin{enumerate}
% \item \emph{Compositional differences}: In repeated cross-sections
% we do not want that the composition
% of the sample changes between periods.
% \begin{itemize}
% \item Falsification Test: Distribution of $(D,X)$ should be similar for the pre-treatment and
% post-treatment periods.
% \end{itemize}\bigskip
\item Non-parallel dynamics\bigskip
\item Compositional differences\bigskip
\item Long-term effects versus reliability\bigskip
\item Functional form dependence\bigskip
\end{enumerate}
Bias is a matter of degree. Small violations of the identification assumptions may not matter much as the bias may be rather small. However, biases can sometimes be so large that the estimates we get are completely wrong, even of the opposite sign of the true treatment effect.\\\bigskip
Helpful to avoid overly strong causal claims for difference-in-differences estimates.
\end{frame}
%\subsection{Non-parallel dynamics}
\begin{frame}
\frametitle{Difference-in-Differences: Threats to Validity}
\begin{enumerate}
% \item \emph{Compositional differences}: In repeated cross-sections
% we do not want that the composition
% of the sample changes between periods.
% \begin{itemize}
% \item Falsification Test: Distribution of $(D,X)$ should be similar for the pre-treatment and
% post-treatment periods.
% \end{itemize}\bigskip
\item \emph{Non-parallel dynamics}: Often treatments/programs are targeted based on pre-existing differences in outcomes.\medskip
\begin{itemize}
\item ``Ashenfelter dip'': participants in training programs often experience a dip in earnings
just before they enter the program (that may be \emph{why} they participate). Since wages have a natural tendency to mean reversion, comparing wages of participants and non-participants using DD leads to an upward biased estimate of the program effect\medskip
\item Regional targeting: NGOs may target villages that appear most promising (or worst off)\medskip
% \item In repeated cross-sections, we do not want that the composition of the sample changes between periods.
\end{itemize}
% \begin{itemize}
% \item Falsification Test: Under the parallel trends assumption during the periods $t=-1,0,1$, we have:
% \[
% E[Y(0)-Y(-1)|D=1]- E[Y(0)-Y(-1)|D=0]=0
% \]
% \item That is, apply DID estimator to $t=-1,0$ and test if $\alpha=0$
% % \item Can use similar placebo test with second control group or other placebo outcomes that
% % are known to be unaffected
% \end{itemize}
%\item \emph{Long-term effects vs. reliability}:
%\begin{itemize}
% \item Parallel trends assumption for DD is more likely to hold over
%a shorter time-window. In the long-run, many other things may happen and confound the effect of the treatment.
%\item Should be cautious to extrapolate short-term effects to long-term effects
%\end{itemize}
\end{enumerate}
\end{frame}
%\begin{frame}
% \frametitle{Checks for Difference-in-Differences Design}
%\begin{enumerate}
% \item Falsification test using data for prior periods
% \begin{itemize}
%\item Given parallel trends during periods $t=-1,0,1$, we have:
% \[
% E[Y(0)-Y(-1)|D=1]- E[Y(0)-Y(-1)|D=0]=0
% \]
%\item run placebo DD on data from $t=-1,0$ and test if $\alpha=0$. If not, your
% estimate comparing $t=0$ and $t=1$ may be biased
% \end{itemize}\medskip \pause
%\item Falsification test using data for alternative control group
% \begin{itemize}
%\item if the placebo DD with the alternative control is different from the DD with the original control, then the original DD may be biased
% \end{itemize}\medskip \pause
%\item Falsification test using alternative placebo outcome that is not supposed to be affected by the treatment
% \begin{itemize}
% \item if DD from placebo outcome is non-zero, then the DD estimate for original outcome may be biased
% \end{itemize}
%\end{enumerate}
%\end{frame}
\begin{frame}
\frametitle{Checks for Difference-in-Differences Design}
\begin{enumerate}
\item Falsification test using data for prior periods \bigskip
% \begin{itemize}
%\item Given parallel trends during periods $t=-1,0,1$, we have:
% \[
% E[Y(0)-Y(-1)|D=1]- E[Y(0)-Y(-1)|D=0]=0
% \]
%\item run placebo DD on data from $t=-1,0$ and test if $\alpha=0$. If not, your
% estimate comparing $t=0$ and $t=1$ may be biased
% \end{itemize}\medskip \pause
\item Falsification test using data for alternative control group \bigskip
% \begin{itemize}
%\item if the placebo DD with the alternative control is different from the DD with the original control, then the original DD may be biased
% \end{itemize}\medskip \pause
\item Falsification test using alternative placebo outcome that is not supposed to be affected by the treatment
% \begin{itemize}
% \item if DD from placebo outcome is non-zero, then the DD estimate for original outcome may be biased
% \end{itemize}
\end{enumerate}
\end{frame}
\begin{frame}
\frametitle{Falsification test: Data for prior periods}
\vspace{-.2in}
\begin{center}
\includegraphics[height=3.2in,keepaspectratio=1]{KCfalsification1.pdf}
\end{center}
\end{frame}
\begin{frame}
\frametitle{Falsification test: Data for prior periods}
\vspace{-.2in}
\begin{center}
\includegraphics[height=3.2in,keepaspectratio=1]{KCfalsification2.pdf}
\end{center}
\end{frame}
\begin{frame}
\frametitle{Falsification test: Data for prior periods}
\vspace{-.2in}
\begin{center}
\includegraphics[height=3.2in,keepaspectratio=1]{KCfalsification3.pdf}
\end{center}
\end{frame}
\begin{frame}
\frametitle{Falsification test: Data for prior periods}
\vspace{-.2in}
\begin{center}
\includegraphics[height=3.2in,keepaspectratio=1]{KCfalsification4.pdf}
\end{center}
\end{frame}
\begin{frame}
\frametitle{Longer Trends in Employment (Card and Krueger 2000)}
\vspace{-.1in}
\begin{center}
\includegraphics[height=3in,keepaspectratio=1]{PreTrend.pdf}
\end{center}
\end{frame}
\begin{frame}
\frametitle{Falsification test: Alternative control group}
\vspace{-.2in}
\begin{center}
\includegraphics[height=1.3in,keepaspectratio=1]{CKresults4.pdf}
\end{center}
% \begin{itemize}
%\item
If placebo DD between original and alternative control group is not zero, then the original DD may be biased
% \end{itemize}\medskip \pause
\end{frame}
\begin{frame}
\frametitle{Triple DDD: Mandated Maternity Benefits (Gruber, 1994)}
\hspace*{0.5cm}\begin{overprint}
\onslide<1|handout:1>\includegraphics[height=3.2in,keepaspectratio=1]{DDD1markup.pdf}
\onslide<2|handout:2>\includegraphics[height=3.2in,keepaspectratio=1]{DDD2markup.pdf}
\onslide<3|handout:3>\includegraphics[height=3.2in,keepaspectratio=1]{DDDmarkup.pdf}
\end{overprint}
\end{frame}
\begin{frame}
\frametitle{How useful is the Triple DDD?}
\begin{itemize}
\item The DDD estimate is the difference between the DD of interest and the placebo DD (that is supposed to be zero)\bigskip
\begin{itemize}
\item If the placebo DD is non zero, it might be difficult to convince reviewers that the DDD removes all the bias\medskip
\item If the placebo DD is zero, then DD and DDD give the same results but DD is preferable because standard errors are smaller for DD than for DDD
\end{itemize}
\end{itemize}
\end{frame}
%\section{Example: Gerhard Schr\"oder's Flood}
%
%\begin{frame}
% \frametitle{The Elbe Valley}
% \vspace{-.06in}
%\begin{center}
% \includegraphics[height=3.1in,keepaspectratio=1]{elbe1.pdf}
%\end{center}
%\end{frame}
%
%
%%\begin{frame}
%% \frametitle{The Elbe Valley: 2001 and 2002}
%% \vspace{-.06in}
%%\begin{center}
%% \includegraphics[height=3.1in,keepaspectratio=1]{NASA.pdf}
%%\end{center}
%%\end{frame}
%
%\begin{frame}
% \frametitle{Schr\"oder Sends the Troops}
%\begin{columns}
% \begin{column}{0.5\textwidth}
% \centerline{\includegraphics[height=1.2in,keepaspectratio=1]{flood1.pdf}}
% \centerline{\includegraphics[height=1.2in,keepaspectratio=1]{flood2.pdf}}
%
%
% \end{column}
%
% \begin{column}{0.3\textwidth}
% \centerline{\includegraphics[height=1.2in,keepaspectratio=1]{flood3.pdf}}
% \centerline{\includegraphics[height=1.2in,keepaspectratio=1]{flood4.pdf}}
% \end{column}
%\end{columns}
%
%\end{frame}
%
%%\begin{frame}
%% \frametitle{Gerhard Schr\"oder's Flood}
%%
%% \begin{itemize}
%% \item Panel data for Germany's 299 electoral districts. $Y$: PR-vote share of Social Democratic Party SPD\bigskip
%% \item Two periods
%% \begin{itemize}
%% \item $T=0$: Federal election 1998
%% \item $T=1$: Federal election 2002
%% \item The Elbe flood occurred in August of 2002 and the election was held in September of 2002
%% \end{itemize}\bigskip
%% \item Treatment: Flooded Districts
%% \begin{itemize}
%% \item $D=1$ Flooded districts (all of which received federal disaster aid)
%% \item $D=0$ Unaffected districts
%% \end{itemize}
%% \end{itemize}
%%\end{frame}
%
%\subsection{Long-term effects versus reliability}
\begin{frame}
\frametitle{Difference-in-Differences: Further Threats to Validity}
\begin{enumerate}
\setcounter{enumi}{1}
\emph{\item Compositional differences}\bigskip