29
Treatment effects Quantitative Methods in Economics Causality and treatment effects Maximilian Kasy Harvard University, fall 2016 1 / 23

Difference in Differences - Harvard University · 2016. 7. 21. · Difference-in-Differences: Threats to Validity 1. Compositional differences: In repeated cross-sections we do not

  • Upload
    others

  • View
    28

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Difference in Differences - Harvard University · 2016. 7. 21. · Difference-in-Differences: Threats to Validity 1. Compositional differences: In repeated cross-sections we do not

Treatment effects

Quantitative Methods in EconomicsCausality and treatment effects

Maximilian Kasy

Harvard University, fall 2016

1 / 23

Page 2: Difference in Differences - Harvard University · 2016. 7. 21. · Difference-in-Differences: Threats to Validity 1. Compositional differences: In repeated cross-sections we do not

Treatment effects

5) Difference-in-Differences

(cf. “Mostly Harmless Econometrics,” chapter 5)

2 / 23

Page 3: Difference in Differences - Harvard University · 2016. 7. 21. · Difference-in-Differences: Threats to Validity 1. Compositional differences: In repeated cross-sections we do not

Treatment effects

Selection on Unobservables

I Often there are reasons to believe that treated and untreateddiffer in unobservable characteristics that are associated topotential outcomes even after controlling for differences inobserved characteristics.

I In such cases, treated and untreated may not be directlycomparable, even after adjusting for observed characteristics.

I The difference-in-differences estimator uses the same strategy asthe panel data fixed-effects estimators to get rid of unobservedconfounders whose effects do not change in time.

3 / 23

Page 4: Difference in Differences - Harvard University · 2016. 7. 21. · Difference-in-Differences: Threats to Validity 1. Compositional differences: In repeated cross-sections we do not

Treatment effects

Motivating Example: The Mariel BoatliftI How do inflows of immigrants affect the wages and employment

of natives in local labor markets?

I Card (1990) uses the Mariel Boatlift of 1980 as a naturalexperiment to measure the effect of a sudden influx of immigrantson unemployment among less-skilled natives

4 / 23

Page 5: Difference in Differences - Harvard University · 2016. 7. 21. · Difference-in-Differences: Threats to Validity 1. Compositional differences: In repeated cross-sections we do not

Treatment effects

Motivating Example: The Mariel BoatliftI How do inflows of immigrants affect the wages and employment

of natives in local labor markets?

I Card (1990) uses the Mariel Boatlift of 1980 as a naturalexperiment to measure the effect of a sudden influx of immigrantson unemployment among less-skilled natives

I The Mariel Boatlift increased the Miami labor force by 7%

I Individual-level data on unemployment from the CurrentPopulation Survey (CPS) for Miami and four comparison cities(Atlanta, Los Angeles, Houston and Tampa-St. Petersburg)

4 / 23

Page 6: Difference in Differences - Harvard University · 2016. 7. 21. · Difference-in-Differences: Threats to Validity 1. Compositional differences: In repeated cross-sections we do not

Treatment effects

Motivating Example: The Mariel Boatlift

(~

\ i

-..~

--- --~

0\ V

V

ii'} 1J')N

OO

~

~ci-

N"':N

V'

"'"'" "'"'"

-I

/ C

'i~~

C

1C1o.

- -0-

-N-

~O\C

;:) I

I I

I

,

viu~u.r:c00

~

- r;::;

~

~

~

~

O\M

O\

000\00.ft

ddd "';:dN

c

'-' '-'

'-" ,-

~

O\M

V

\0\00 C

E

- M

~d

o\NM

~

~

OO

~

- 0

0 O

\N

I I.r:

- --

~0.

ua

~U

, d

C

~

='

L..0

C

t:

0 u

',--- --~

0

c: -M

- r-..000\"d

0 ...

...~

.- -

0 -

- 0

--"""""

K

~

. -vr-..

MM

O

C

\~

00 .

.. '"

'/ .-

~

0\ 1J') V

0

00 0

N

gau

t-- -

C/)

e >

c ~

c.s I

""".-

\0

10.., "d

~

~u~

MU

rl

U

C

c: :0

.I:: 0

0 ~

... ~

~

L.

10.., .~

.~

~0

0. 0..

0

'a a

E

0\0

0 0\

~

U

-~

I

Y

-~

(I)

.6~

';j

u u

~

'-'

II) '-.-

~

au

.~

~

.~

~

r \

U

,- u'-

'-'

~

0.2-: c.2-:

ag

°u O

GJ

0U

'~ ~

U

.~~U

.L..

L.. C

C

~

u,.. II)

.- U

~

,;...

U

I£: -

U~

o..~

~F

;0..L.. U

~

='

,~

~

a ~

u

;a a

~

"0 R

e ,-

0~

~

.-

0~

0..

t!: (,5

~~

UQ

~

~U

Q

~';,

<II)

: G

J ,.

; U

II)

0 C

U

' U

-0

' ~

Z,

, G

J or

!~

, ---

---"'I

.- N

l~

Q

~_c

~~

~

.,

\:)

5 / 23

Page 7: Difference in Differences - Harvard University · 2016. 7. 21. · Difference-in-Differences: Threats to Validity 1. Compositional differences: In repeated cross-sections we do not

Treatment effects

Difference-in-Differences Setup

Two groups:I D = 1: treated unitsI D = 0: control units

Two periods:I T = 0: pre-treatment periodI T = 1: post-treatment period

Potential outcomes:I Y1i(t): outcome unit i attains in period t if treated before tI Y0i(t): outcome unit i attains in period t if not treated before t

6 / 23

Page 8: Difference in Differences - Harvard University · 2016. 7. 21. · Difference-in-Differences: Threats to Validity 1. Compositional differences: In repeated cross-sections we do not

Treatment effects

Difference-in-Differences SetupTreatment effect for unit i at time t is

Y1i(t)−Y0i(t).

Observed outcomes Yi(t) are realized as

Yi(t) = Y0i(t)(1−Di(t)) + Y1i(t)Di(t).

Because the treatment occurs only after t = 0, we define

Di = Di(1).

It follows that,

Yi(0) = Y0i(0),

Yi(1) = Y0i(1)(1−Di) + Y1i(1)Di .

7 / 23

Page 9: Difference in Differences - Harvard University · 2016. 7. 21. · Difference-in-Differences: Threats to Validity 1. Compositional differences: In repeated cross-sections we do not

Treatment effects

Difference-in-Differences Result

LetαATET = E[Y1(1)−Y0(1)|D = 1].

If the treated and non-treated would have exhibited the same trend inthe absence of the treatment,

E[Y0(1)−Y0(0)|D = 1] = E[Y0(1)−Y0(0)|D = 0],

then:

αATET =[E[Y (1)|D = 1]−E[Y (1)|D = 0]

]−[E[Y (0)|D = 1]−E[Y (0)|D = 0]

].

8 / 23

Page 10: Difference in Differences - Harvard University · 2016. 7. 21. · Difference-in-Differences: Threats to Validity 1. Compositional differences: In repeated cross-sections we do not

Treatment effects

Difference-in-Differences: Graphical Interpretation

-

6

����

����

��

""""""""""

rr r

r

t = 0 t = 1

E[Y (0)|D = 0]

E[Y (0)|D = 1]

E[Y (1)|D = 0]

E[Y (1)|D = 1]

����

����

���� bE[Y0(1)|D = 1]

6

?E[Y1(1)−Y0(1)|D = 1]

9 / 23

Page 11: Difference in Differences - Harvard University · 2016. 7. 21. · Difference-in-Differences: Threats to Validity 1. Compositional differences: In repeated cross-sections we do not

Treatment effects

Difference-in-Differences: Graphical Interpretation

-

6

����

����

��

""""""""""

rr r

r

t = 0 t = 1

E[Y (0)|D = 0]

E[Y (0)|D = 1]

E[Y (1)|D = 0]

E[Y (1)|D = 1]

����

����

���� b

E[Y0(1)|D = 1]

6

?E[Y1(1)−Y0(1)|D = 1]

9 / 23

Page 12: Difference in Differences - Harvard University · 2016. 7. 21. · Difference-in-Differences: Threats to Validity 1. Compositional differences: In repeated cross-sections we do not

Treatment effects

Difference-in-Differences: Graphical Interpretation

-

6

����

����

��

""""""""""

rr r

r

t = 0 t = 1

E[Y (0)|D = 0]

E[Y (0)|D = 1]

E[Y (1)|D = 0]

E[Y (1)|D = 1]

����

����

���� bE[Y0(1)|D = 1]

6

?E[Y1(1)−Y0(1)|D = 1]

9 / 23

Page 13: Difference in Differences - Harvard University · 2016. 7. 21. · Difference-in-Differences: Threats to Validity 1. Compositional differences: In repeated cross-sections we do not

Treatment effects

Difference-in-Differences: Graphical Interpretation

-

6

����

����

��

""""""""""

rr r

r

t = 0 t = 1

E[Y (0)|D = 0]

E[Y (0)|D = 1]

E[Y (1)|D = 0]

E[Y (1)|D = 1]

����

����

���� bE[Y0(1)|D = 1]

6

?E[Y1(1)−Y0(1)|D = 1]

9 / 23

Page 14: Difference in Differences - Harvard University · 2016. 7. 21. · Difference-in-Differences: Threats to Validity 1. Compositional differences: In repeated cross-sections we do not

Treatment effects

Difference-in-Differences Estimators

1. Panel Data/Sample Means{1

N1∑

Di=1Yi(1)− 1

N0∑

Di=0Yi(1)

}−

{1

N1∑

Di=1Yi(0)− 1

N0∑

Di=0Yi(0)

}

=

{1

N1∑

Di=1{Yi(1)−Yi(0)}− 1

N0∑

Di=0{Yi(1)−Yi(0)}

},

where N1 is the number of treated individuals and N0 is the number ofnon-treated individuals.

10 / 23

Page 15: Difference in Differences - Harvard University · 2016. 7. 21. · Difference-in-Differences: Threats to Validity 1. Compositional differences: In repeated cross-sections we do not

Treatment effects

Difference-in-Differences Estimators

2. Repeated Cross-Sections/Sample Means

Let {Yi ,Di ,Ti}Ni=1 be the pooled sample (the two different

cross-sections merged) where T is a variable that indicates the period(0 or 1) in which the individual is observed.

A DID estimator is given by:{∑Di ·Ti ·Yi

∑Di ·Ti− ∑(1−Di) ·Ti ·Yi

∑(1−Di) ·Ti

}−{

∑Di · (1−Ti) ·Yi

∑Di · (1−Ti)− ∑(1−Di) · (1−Ti) ·Yi

∑(1−Di) · (1−Ti)

}.

11 / 23

Page 16: Difference in Differences - Harvard University · 2016. 7. 21. · Difference-in-Differences: Threats to Validity 1. Compositional differences: In repeated cross-sections we do not

Treatment effects

Difference-in-Differences Estimators

3. Repeated Cross-Sections/Regression

The same estimator can be obtained using regression techniques.Consider the linear model:

Yi = µ + γ ·Di + δ ·Ti + α · (Di ·Ti) + εi ,

where E[ε|D,T ] = 0. Then, it is easy to show that

α = {E[Y |D = 1,T = 1]−E[Y |D = 0,T = 1]}− {E[Y |D = 1,T = 0]−E[Y |D = 0,T = 0]} .

12 / 23

Page 17: Difference in Differences - Harvard University · 2016. 7. 21. · Difference-in-Differences: Threats to Validity 1. Compositional differences: In repeated cross-sections we do not

Treatment effects

Difference-in-Differences Estimators

Consider a regression version of the DID estimator including covariates:

Yi = µ + γDi + δTi + αDiTi + X ′i β + εi .

I introducing time-invariant X ’s in this way is not helpful (they getdifferenced-out)

I time-varying X ’s may be problematic because they are often affected bythe treatment and may introduce endogeneity

More sensible: Interact time-invariant covariates with the time indicator:

Yi = µ + γDi + δTi + αDiTi + TiX′i β1 + (1−Ti)X ′i β0 + εi

⇒ X is used to explain differences in trends.

13 / 23

Page 18: Difference in Differences - Harvard University · 2016. 7. 21. · Difference-in-Differences: Threats to Validity 1. Compositional differences: In repeated cross-sections we do not

Treatment effects

Difference-in-Differences Estimators

4. Panel Data/Regression

With panel data we can use regression with the dependent variable infirst differences:

∆Yi = δ + α ·Di + X ′i β + ui ,

where ∆Yi = Yi(1)−Yi(0), β = β1−β0, and ui = ∆εi .

⇒ Here X also explains differences in trends.

14 / 23

Page 19: Difference in Differences - Harvard University · 2016. 7. 21. · Difference-in-Differences: Threats to Validity 1. Compositional differences: In repeated cross-sections we do not

Treatment effects

Difference-in-Differences Estimators

The fixed effects estimator generalizes DID in the context of panel data andmultiple groups and time periods:

Yit = µ + γi + δt + αDit + X ′itβ + εit

I One intercept for each unit, γi , and time period, δtI Cluster standard errors at the subject unit levelI Can add unit specific time trends:

Yit = µ + γ0i + γ1i t + δt + αDit + X ′itβ + εit

with unit specific intercepts γ0i and unit specific trend coefficients γ1i thatmultiply time trend variable t .

15 / 23

Page 20: Difference in Differences - Harvard University · 2016. 7. 21. · Difference-in-Differences: Threats to Validity 1. Compositional differences: In repeated cross-sections we do not

Treatment effects

Difference-in-Differences: Threats to Validity1. Compositional differences: In repeated cross-sections we do

not want that the composition of the sample changes betweenperiods.

The distribution of (D,X) should be similar for the pre-treatmentand post-treatment periods.

2. Non-parallel trends: Different trends for treated and nontreatedin the absence of the treatment.

Falsification Test: Under the parallel trends assumption during theperiods t =−1,0,1, we have:

E[Y (0)−Y (−1)|D = 1]−E[Y (0)−Y (−1)|D = 0] = 0

Apply DID estimator to t =−1,0 and test if α = 016 / 23

Page 21: Difference in Differences - Harvard University · 2016. 7. 21. · Difference-in-Differences: Threats to Validity 1. Compositional differences: In repeated cross-sections we do not

Treatment effects

DDD: Mandated Maternity Benefits (Gruber, 1994)

17 / 23

Page 22: Difference in Differences - Harvard University · 2016. 7. 21. · Difference-in-Differences: Threats to Validity 1. Compositional differences: In repeated cross-sections we do not

Treatment effects

DDD: Mandated Maternity Benefits (Gruber, 1994)

17 / 23

Page 23: Difference in Differences - Harvard University · 2016. 7. 21. · Difference-in-Differences: Threats to Validity 1. Compositional differences: In repeated cross-sections we do not

Treatment effects

DDD: Mandated Maternity Benefits (Gruber, 1994)

17 / 23

Page 24: Difference in Differences - Harvard University · 2016. 7. 21. · Difference-in-Differences: Threats to Validity 1. Compositional differences: In repeated cross-sections we do not

Treatment effects

Terrorism in Cities (Abadie and Dermisi, 2008)

21

FIGURE I

Chicago’s Central Business District Office Buildings and Shadow Areas

Crosses represent all Class A and Class B office buildings in Chicago’s Central Business District. Shaded circles represent 0.3-mile radius “shadow areas” surrounding the three main Chicago landmark buildings: the Aon Center, the Hancock Center, and the Sears Tower.

18 / 23

Page 25: Difference in Differences - Harvard University · 2016. 7. 21. · Difference-in-Differences: Threats to Validity 1. Compositional differences: In repeated cross-sections we do not

Treatment effects

Terrorism in Cities (Abadie and Dermisi, 2008)

22

.0

5.1

.15

.2av

erag

e to

tal v

acan

cy ra

te

1996 1997 1998 1999 2000 2001 2002 2003 2004 2005year

Shadow areasNon-shadow areas

FIGURE II

Average Vacancy Rates in Shadow and Non-shadow Areas

19 / 23

Page 26: Difference in Differences - Harvard University · 2016. 7. 21. · Difference-in-Differences: Threats to Validity 1. Compositional differences: In repeated cross-sections we do not

Treatment effects

Terrorism in Cities (Abadie and Dermisi, 2008)

25

TABLE I

DESCRIPTIVE STATISTICS – MEANS AND STANDARD DEVIATIONS (Class A and B office buildings in downtown Chicago)

(1) Entire sample

(2) Inside shadow

areas

(3) Outside

shadow areas

(4) Diff. (2)-(3)

(s.e.) Characteristics of the buildings:

shadow (= 1 if in shadow area, = 0 otherwise)

.27 [.45]

Class A (=1 if Class A building, =0 if Class B building)

.21 [.41]

.44 [.50]

.13 [.34]

.31** (.07)

distance to anchor (miles)

.46 [.26]

.19 [.08]

.56 [.24]

-.38** (.02)

height (hundred feet)

2.76 [2.46]

4.43 [2.90]

2.14 [1.94]

2.29** (.39)

number of stories

19.77 [18.80]

32.59 [21.67]

14.96 [15.08]

17.63** (2.90)

rentable building area (sq. feet)

353,683 [499,847]

665,705 [604,842]

236,675 [397,123]

429,031** (80,243)

Vacancy rates (fraction):

First quarter of 2001

.0803 [.0949]

.0901 [.0903]

.0699 [.0989]

.0202 (.0174)

First quarter of 2006

.1491 [.1306]

.1740 [.1302]

.1228 [.1266]

.0512** (.0248)

Rent per square foot (current USD):

First quarter of 2001

30.40 [5.43]

32.22 [5.59]

28.08 [4.25]

4.14** (1.23)

First quarter of 2006

28.08 [5.97]

29.09 [5.30]

26.78 [6.54]

2.31* (1.28)

Number of buildings in the sample 242 66 176 Note: Columns (1) to (3) report sample means, with the standard deviations in brackets. Column (4) reports the difference between columns (2) and (3), along with the standard deviation for the difference in parentheses. The sample is a balanced panel of Class A and Class B office buildings in the extended Chicago Central Business District between the second quarter of 1996 and the second quarter of 2006. See text of the article for the exact limits of the area of the City of Chicago included in our sample. Vacancy rates and rents are weighted by the rentable area of the buildings. Rent figures reflect asking rents for office building space available at the time of the survey. Data on rents for the first quarter of 2001 are available for 54 buildings inside the shadow areas and 80 buildings outside the shadow areas. Data on rents for the first quarter of 2006 are available for 55 buildings inside the shadow areas and 97 buildings outside the shadow areas. * indicates statistical significance at the 10% level. ** indicates statistical significance at the 5% level.

20 / 23

Page 27: Difference in Differences - Harvard University · 2016. 7. 21. · Difference-in-Differences: Threats to Validity 1. Compositional differences: In repeated cross-sections we do not

Treatment effects

Terrorism in Cities (Abadie and Dermisi, 2008)

26

TABLE II

9/11 AND VACANCY RATES IN DOWNTOWN CHICAGO OFFICE BUILDINGS (Fixed-effects estimates with clustered standard errors, 1996-2006)

Dependent variable: Building vacancy rate (1) (2) (3) (4)

shadow area×post-9/11

.0303* (.0166)

distance to anchor×post-9/11

-.0617* (.0362)

distance to non-shadow area×post-9/11

.2302** (.0633)

height×post-9/11

.0052** (.0022)

R-squared .39 .39 .39 .39 Number of observations 9,922 9,922 9,922 9,922 Note: The sample is a quarterly panel of Class A and Class B office buildings in the extended Chicago Central Business District between the second quarter of 1996 and the second quarter of 2006. See text of the article for the exact limits of the area of the City of Chicago included in our sample. Observations are weighted by the rentable area of the buildings. All specifications include building fixed effects and a full set of year×quarter dummies. Standard errors (in parentheses) are clustered at the building level. * indicates statistical significance at the 10% level. ** indicates statistical significance at the 5% level.

21 / 23

Page 28: Difference in Differences - Harvard University · 2016. 7. 21. · Difference-in-Differences: Threats to Validity 1. Compositional differences: In repeated cross-sections we do not

Treatment effects

Terrorism in Cities (Abadie and Dermisi, 2008)

27

TABLE III

TIME SINCE 9/11 AND VACANCY RATES IN DOWNTOWN CHICAGO OFFICE BUILDINGS (Fixed-effects estimates with clustered standard errors, 1996-2006)

Dependent variable: Building vacancy rate (1) (2) (3) (4)

shadow area×post-9/11

-.0046 (.0173)

shadow area×quarters since 9/11 .0037** (.0017)

distance to anchor×post-9/11

.0156 (.0379)

distance to anchor×quarters since 9/11

-.0081** (.0039)

distance to non-shadow area×post-9/11

.0614 (.0639)

distance to non-shadow area×quarters since 9/11

.0178** (.0060)

height×post-9/11

-.0003 (.0022)

height×quarters since 9/11

.0006** (.0002)

R-squared .39 .39 .39 .39 Number of observations 9,922 9,922 9,922 9,922 Note: The sample is a quarterly panel of Class A and Class B office buildings in the extended Chicago Central Business District between the second quarter of 1996 and the second quarter of 2006. See text of the article for the exact limits of the area of the City of Chicago included in our sample. Observations are weighted by the rentable area of the buildings. All specifications include building fixed effects and a full set of year×quarter dummies. Standard errors (in parentheses) are clustered at the building level. * indicates statistical significance at the 10% level. ** indicates statistical significance at the 5% level.

22 / 23

Page 29: Difference in Differences - Harvard University · 2016. 7. 21. · Difference-in-Differences: Threats to Validity 1. Compositional differences: In repeated cross-sections we do not

Treatment effects

Terrorism in Cities (Abadie and Dermisi, 2008)

29

TABLE V

REGRESSIONS USING PRE-9/11 DATA ONLY (Fixed-effects estimates with clustered standard errors, 1996-2001)

Dependent variable: Building vacancy rate (1) (2) (3) (4)

shadow area×after 1998

. 0120 (.0165)

distance to anchor×after 1998

-.0313 (.0370)

distance to non-shadow area×after 1998

.1017 (.0839)

height×after 1998

.0026 (.0025)

R-squared .48 .48 .48 .48 Number of observations 5,324 5,324 5,324 5,324 Note: The sample is a quarterly panel of Class A and Class B office buildings in the extended Chicago Central Business District between the second quarter of 1996 and the third quarter of 2001. See text of the article for the exact limits of the area of the City of Chicago included in our sample. Observations are weighted by the rentable area of the buildings. All specifications include building fixed effects and a full set of year×quarter dummies. Standard errors (in parentheses) are clustered at the building level. * indicates statistical significance at the 10% level. ** indicates statistical significance at the 5% level.

23 / 23