CausalInference w7 Panel
CausalInference w7 Panel
Panel diff-in-diff
Andy Eggers
Oxford DPIR
HT 2018
1/30
Introduction
Introduction
Panel diff-in-diff
Motivating example
Basic estimation
Interpretation and assumptions
Relaxing parallel trends assumption
Testing assumptions
2/30
Introduction
Overview
3/30
Introduction
Simplest diff-in-diff
● Group T
● Group C
● ATT given
common trends
assumption
●
Time trend in group T?
●
●
Time trend in group C
●
Before After
4/30
Introduction
5/30
Introduction
6/30
Introduction
Yit = β1 treatmentit + αt + γi
But in panel data we can run this regression for any type of treatment
applied in any pattern.
7/30
Panel diff-in-diff
Introduction
Panel diff-in-diff
Motivating example
Basic estimation
Interpretation and assumptions
Relaxing parallel trends assumption
Testing assumptions
8/30
Panel diff-in-diff Motivating example
Consider assessing this with cross-sectional data (Ward & John, 1999).
I What covariates would you need?
I What about IV?
I What about RDD?
9/30
Panel diff-in-diff Motivating example
10/30
Panel diff-in-diff Basic estimation
LogOfGrantsPerCapitait = β1 Copartisani ,t −1 + αt + γi
11/30
Panel diff-in-diff Basic estimation
12/30
Panel diff-in-diff Basic estimation
0.25
Effect of partisan alignment on (log) specific grants
0.20
●
●
0.15
●
●
●
●
0.10
0.05
●
0.00
−0.10
0 1 2 3 4 5 6
LogOfGrantsPerCapitait = β1 Copartisani ,t −k + αt + γi
0.25
Effect of partisan alignment on (log) specific grants
I rural councils get fewer
0.20
per-capita grants and tend to be ●
●
0.15
●
●
●
0.10
governments in 1992-2012?
0.05
●
0.00
grants when they were in
government, and there are more −0.10
14/30
Panel diff-in-diff Interpretation and assumptions
where
I Xt are time-specific variables that affect outcomes for all units the
same way (e.g. budget for targeted grants),
I Ui are unit-specific variables that are constant over time (e.g.
urban/rural character, presence of Roman ruins),
I Vit are variables that may vary within units over time (e.g. presence of
ambitious council member, local economic situation), and
I ωit is random noise.
In panel-DiD analysis where we estimate Yit = β1 Dit + αt + γi + it ,
I time dummies (αt ) control for all Xt
I unit dummies (γi ) control for all Ui
so the only possible confounders are Vit .
15/30
Panel diff-in-diff Interpretation and assumptions
Copartisani ,t −k = αt + γi
Key conclusions:
I All residuals will be zero for any unit that is always treated or never treated → no role
in estimating β1
I β1 estimated based on variation in treatment over time within units
I the only relevant confounders vary with treatment over time within units
16/30
Panel diff-in-diff Interpretation and assumptions
LogOfGrantsPerCapitait = β1 Copartisani ,t −k + αt + γi
0.25
Effect of partisan alignment on (log) specific grants
What confounders might vary with
0.20
treatment over time within units?
●
●
0.15
●
●
●
●
0.10
I
needs, Conservative councils
0.05
●
shrinking needs?
0.00
I Labour councillors improving? −0.10
I others? 0 1 2 3 4 5 6
17/30
Panel diff-in-diff Relaxing parallel trends assumption
LogOfGrantsPerCapitait = β1 Copartisani ,t −k + αt + γi
LogOfGrantsPerCapitait = β1 Copartisani ,t −k + αt + γi + γi t
18/30
Panel diff-in-diff Relaxing parallel trends assumption
0.25
Effect of partisan alignment on (log) specific grants
0.20
●
●
0.15
●
●
●
●
0.10
● ●
0.05
●
●
0.00
●
●
−0.10
0 1 2 3 4 5 6
● ●
●
●
● ●
● ●
●
−0.05
−0.15
−3 −2 −1 0 1 2 3 4 5 6
Introduction
Panel diff-in-diff
Motivating example
Basic estimation
Interpretation and assumptions
Relaxing parallel trends assumption
Testing assumptions
21/30
Further examples and extensions Levitt on effect of campaign spending
22/30
Further examples and extensions Levitt on effect of campaign spending
23/30
Further examples and extensions Levitt on effect of campaign spending
As noted above, the only relevant confounders are those that change
within units over time.
In panel DiD you can control for observable covariate that change within
units over time, e.g.:
24/30
Further examples and extensions Levitt on effect of campaign spending
25/30
Further examples and extensions Ansell on effect of house prices on welfare attitudes
26/30
Further examples and extensions Ansell on effect of house prices on welfare attitudes
28/30
Further examples and extensions Adler on the “Waitrose effect”
29/30
Further examples and extensions Adler on the “Waitrose effect”
30/30