two way fixed effect models
DESCRIPTION
Fixed Effects Model in StatisticsTRANSCRIPT
![Page 1: Two Way Fixed Effect Models](https://reader035.vdocuments.site/reader035/viewer/2022081420/577c86e21a28abe054c2f674/html5/thumbnails/1.jpg)
Two-way fixed-effect modelsDifference in difference
1
![Page 2: Two Way Fixed Effect Models](https://reader035.vdocuments.site/reader035/viewer/2022081420/577c86e21a28abe054c2f674/html5/thumbnails/2.jpg)
Two-way fixed effects
• Balanced panels• i=1,2,3….N groups• t=1,2,3….T observations/group• Easiest to think of data as varying across
states/time• Write model as single observation• Yit=α + Xitβ + ui + vt +εit
• Xit is (1 x k) vector
2
![Page 3: Two Way Fixed Effect Models](https://reader035.vdocuments.site/reader035/viewer/2022081420/577c86e21a28abe054c2f674/html5/thumbnails/3.jpg)
• Three-part error structure• ui – group fixed-effects. Control for
permanent differences between groups• vt – time fixed effects. Impacts common to
all groups but vary by year• εit -- idiosyncratic error
3
![Page 4: Two Way Fixed Effect Models](https://reader035.vdocuments.site/reader035/viewer/2022081420/577c86e21a28abe054c2f674/html5/thumbnails/4.jpg)
4
Current excise tax rates
• Low: SC($0.07), MO ($0.17), VA($0.30)• High: RI ($3.46), NY ($2.75); NJ($2.70)• Average of $1.32 across states• Average in tobacco producing states:
$0.40• Average in non-tobacco states, $1.44• Average price per pack is $5.12
![Page 5: Two Way Fixed Effect Models](https://reader035.vdocuments.site/reader035/viewer/2022081420/577c86e21a28abe054c2f674/html5/thumbnails/5.jpg)
5
![Page 6: Two Way Fixed Effect Models](https://reader035.vdocuments.site/reader035/viewer/2022081420/577c86e21a28abe054c2f674/html5/thumbnails/6.jpg)
6
0
10
20
30
40
50
60
70
80
90
100
0
50
100
150
200
250
1960 1965 1970 1975 1980 1985 1990 1995 2000 2005
Cen
ts/p
ack
(201
1 $)
Per c
apita
pac
ks/y
ear
Year
Cigarette Consumption and Taxes
Per capita packs Real state tax
![Page 7: Two Way Fixed Effect Models](https://reader035.vdocuments.site/reader035/viewer/2022081420/577c86e21a28abe054c2f674/html5/thumbnails/7.jpg)
7
Do taxes reduce consumption?
• Law of demand– Fundamental result of micro economic theory– Consumption should fall as prices rise– Generated from a theoretical model of
consumer choice• Thought by economists to be fairly
universal in application• Medical/psychological view – certain
goods not subject to these laws
![Page 8: Two Way Fixed Effect Models](https://reader035.vdocuments.site/reader035/viewer/2022081420/577c86e21a28abe054c2f674/html5/thumbnails/8.jpg)
8
• Starting in 1970s, several authors began to examine link between cigarette prices and consumption
• Simple research design– Prices typically changed due to state/federal
tax hikes– States with changes are ‘treatment’– States without changes are control
![Page 9: Two Way Fixed Effect Models](https://reader035.vdocuments.site/reader035/viewer/2022081420/577c86e21a28abe054c2f674/html5/thumbnails/9.jpg)
9
• Near universal agreement in results– 10% increase in price reduces demand by 4%– Change in smoking evenly split between
• Reductions in number of smokers• Reductions in cigs/day among remaining smokers
• Results have been replicated– in other countries/time periods, variety of
statistical models, subgroups– For other addictive goods: alcohol, cocaine,
marijuana, heroin, gambling
![Page 10: Two Way Fixed Effect Models](https://reader035.vdocuments.site/reader035/viewer/2022081420/577c86e21a28abe054c2f674/html5/thumbnails/10.jpg)
10
Taxes now an integral part of antismoking campaigns
• Key component of ‘Master Settlement’
• Surgeon General’s report– “raising tobacco excise taxes is widely
regarded as one of the most effective tobacco prevention and control strategies.”
• Tax hikes are now designed to reduce smoking
![Page 11: Two Way Fixed Effect Models](https://reader035.vdocuments.site/reader035/viewer/2022081420/577c86e21a28abe054c2f674/html5/thumbnails/11.jpg)
11
60
70
80
90
100
110
120
130
140
40
50
60
70
80
90
100
110
120
Per c
apita
opa
kcs
, Con
trol
Sta
tes
Per c
apita
pac
ks, T
reat
men
t Sta
te
Year
Wyoming: From 12¢ to 60¢ in 2001
Wyoming States without tax change
![Page 12: Two Way Fixed Effect Models](https://reader035.vdocuments.site/reader035/viewer/2022081420/577c86e21a28abe054c2f674/html5/thumbnails/12.jpg)
12
80
90
100
110
120
130
140
90
100
110
120
130
140
150
Per c
apita
opa
kcs
, Con
trol
Sta
tes
Per c
apita
pac
ks, T
reat
men
t Sta
te
Year
IN: From 15.5¢ to 55.5¢ in 2002
Indiana States without tax change
![Page 13: Two Way Fixed Effect Models](https://reader035.vdocuments.site/reader035/viewer/2022081420/577c86e21a28abe054c2f674/html5/thumbnails/13.jpg)
13
80
90
100
110
120
130
140
50
60
70
80
90
100
110
Per c
apita
opa
kcs
, Con
trol
Sta
tes
Per c
apita
pac
ks, T
reat
men
t Sta
te
Year
CT: From 50¢ to 110¢ in 2002110¢ to 151¢ in 2003
Connecticut States without tax change
![Page 14: Two Way Fixed Effect Models](https://reader035.vdocuments.site/reader035/viewer/2022081420/577c86e21a28abe054c2f674/html5/thumbnails/14.jpg)
14
80
90
100
110
120
130
140
60
70
80
90
100
110
120
Per c
apita
opa
kcs
, Con
trol
Sta
tes
Per c
apita
pac
ks, T
reat
men
t Sta
te
Year
MI: From 25¢ to 75¢ in 1994From 75¢ to 125¢ in 2003
California States without tax change
![Page 15: Two Way Fixed Effect Models](https://reader035.vdocuments.site/reader035/viewer/2022081420/577c86e21a28abe054c2f674/html5/thumbnails/15.jpg)
Caution
• In balanced panel, two-way fixed-effects equivalent to subtracting– Within group means– Within time means– Adding sample mean
• Only true in balanced panels• If unbalanced, need to do the following
15
![Page 16: Two Way Fixed Effect Models](https://reader035.vdocuments.site/reader035/viewer/2022081420/577c86e21a28abe054c2f674/html5/thumbnails/16.jpg)
• Can subtract off means on one dimension (i or t)
• But need to add the dummies for the other dimension
16
![Page 17: Two Way Fixed Effect Models](https://reader035.vdocuments.site/reader035/viewer/2022081420/577c86e21a28abe054c2f674/html5/thumbnails/17.jpg)
• * generate real taxes• gen s_f_rtax=(state_tax+federal_tax)/cpi• label var s_f_rtax "state+federal real tax on cigs,
cents/pack"• • * real per capita income• gen ln_pcir=ln(pci/cpi)• label var ln_pcir "ln of real real per capita income"• • * generate ln packs_pc• gen ln_packs_pc=ln(packs_pc)• • * construct state and year effects• xi i.state i.year
17
![Page 18: Two Way Fixed Effect Models](https://reader035.vdocuments.site/reader035/viewer/2022081420/577c86e21a28abe054c2f674/html5/thumbnails/18.jpg)
• * run two way fixed effect model by brute force• * covariates are real tax and ln per capita income• reg ln_packs_pc _I* ln_pcir s_f_rtax • • * now be more elegant take out the state effects by areg• areg ln_packs_pc _Iyear* ln_pcir s_f_rtax, absorb(state) • • * for simplicity, redefine variables as y x1 (ln_pcir) • * x2 (s-f_rtax)• • gen y=ln_packs_pc• gen x1=ln_pcir• gen x2=s_f_rtax
18
![Page 19: Two Way Fixed Effect Models](https://reader035.vdocuments.site/reader035/viewer/2022081420/577c86e21a28abe054c2f674/html5/thumbnails/19.jpg)
• * sort data by state, then get means of within state variables
• sort state• by state: egen y_state=mean(y)• by state: egen x1_state=mean(x1)• by state: egen x2_state=mean(x2)• • • * sort data by state, then get means of within state
variables• sort year• by year: egen y_year=mean(y)• by year: egen x1_year=mean(x1)• by year: egen x2_year=mean(x2)
19
![Page 20: Two Way Fixed Effect Models](https://reader035.vdocuments.site/reader035/viewer/2022081420/577c86e21a28abe054c2f674/html5/thumbnails/20.jpg)
• * get sample means• egen y_sample=mean(y)• egen x1_sample=mean(x1)• egen x2_sample=mean(x2)• • * generate the devaitions from means• gen y_tilda=y-y_state-y_year+y_sample• gen x1_tilda=x1-x1_state-x1_year+x1_sample• gen x2_tilda=x2-x2_state-x2_year+x2_sample• • • * the means should be maching zero• sum y_tilda x1_tilda x2_tilda
20
![Page 21: Two Way Fixed Effect Models](https://reader035.vdocuments.site/reader035/viewer/2022081420/577c86e21a28abe054c2f674/html5/thumbnails/21.jpg)
• * run the regression on differenced values• *since means are zero, you should have no constant• * notice that the standard errors are incorrect • * because the model is not counting the 51 state dummies• * and 19 year dummies. The recorded DOF are• * 1020 - 2 = 1018 but it should be 1020-2-51-19=948• * multiply the standard errors by
sqrt(1018/948)=1.036262• reg y_tilda x1_tilda x2_tilda, noconstant
21
![Page 22: Two Way Fixed Effect Models](https://reader035.vdocuments.site/reader035/viewer/2022081420/577c86e21a28abe054c2f674/html5/thumbnails/22.jpg)
• . * run two way fixed effect model by brute force• . * covariates are real tax and ln per capita income• . reg ln_packs_pc _I* ln_pcir s_f_rtax • • Source | SS df MS Number of obs = 1020• -------------+------------------------------ F( 71, 948) = 226.24• Model | 73.7119499 71 1.03819648 Prob > F = 0.0000• Residual | 4.35024662 948 .004588868 R-squared = 0.9443• -------------+------------------------------ Adj R-squared = 0.9401• Total | 78.0621965 1019 .07660667 Root MSE = .06774• • ------------------------------------------------------------------------------• ln_packs_pc | Coef. Std. Err. t P>|t| [95% Conf. Interval]• -------------+----------------------------------------------------------------• _Istate_2 | .0926469 .0321122 2.89 0.004 .0296277 .155666• _Istate_3 | .245017 .0342414 7.16 0.000 .1778192 .3122147• • Delete results• • _Iyear_1998 | -.3249588 .0226916 -14.32 0.000 -.3694904 -.2804272• _Iyear_1999 | -.3664177 .0232861 -15.74 0.000 -.412116 -.3207194• _Iyear_2000 | -.373204 .0255011 -14.63 0.000 -.4232492 -.3231589• ln_pcir | .2818674 .0585799 4.81 0.000 .1669061 .3968287• s_f_rtax | -.0062409 .0002227 -28.03 0.000 -.0066779 -.0058039• _cons | 2.294338 .5966798 3.85 0.000 1.123372 3.465304• ------------------------------------------------------------------------------
22
![Page 23: Two Way Fixed Effect Models](https://reader035.vdocuments.site/reader035/viewer/2022081420/577c86e21a28abe054c2f674/html5/thumbnails/23.jpg)
• Source | SS df MS Number of obs = 1020• -------------+------------------------------ F( 2, 1018) = 466.93• Model | 3.99070575 2 1.99535287 Prob > F = 0.0000• Residual | 4.35024662 1018 .004273327 R-squared = 0.4784• -------------+------------------------------ Adj R-squared = 0.4774• Total | 8.34095237 1020 .008177404 Root MSE = .06537• • ------------------------------------------------------------------------------• y_tilda | Coef. Std. Err. t P>|t| [95% Conf. Interval]• -------------+----------------------------------------------------------------• x1_tilda | .2818674 .05653 4.99 0.000 .1709387 .3927961• x2_tilda | -.0062409 .0002149 -29.04 0.000 -.0066626 -.0058193• ------------------------------------------------------------------------------•
• SE on X1 0.05653*1.036262 = 0.05858• SE on X2 0.0002149*1.036262 = 0.0002227
23
![Page 24: Two Way Fixed Effect Models](https://reader035.vdocuments.site/reader035/viewer/2022081420/577c86e21a28abe054c2f674/html5/thumbnails/24.jpg)
Difference in difference models
• Maybe the most popular identification strategy in applied work today
• Attempts to mimic random assignment with treatment and “comparison” sample
• Application of two-way fixed effects model
24
![Page 25: Two Way Fixed Effect Models](https://reader035.vdocuments.site/reader035/viewer/2022081420/577c86e21a28abe054c2f674/html5/thumbnails/25.jpg)
Problem set up
• Cross-sectional and time series data• One group is ‘treated’ with intervention• Have pre-post data for group receiving
intervention• Can examine time-series changes but,
unsure how much of the change is due to secular changes
25
![Page 26: Two Way Fixed Effect Models](https://reader035.vdocuments.site/reader035/viewer/2022081420/577c86e21a28abe054c2f674/html5/thumbnails/26.jpg)
time
Y
t1 t2
Ya
Yb
Yt1
Yt2
True effect = Yt2-Yt1
Estimated effect = Yb-Ya
ti
26
![Page 27: Two Way Fixed Effect Models](https://reader035.vdocuments.site/reader035/viewer/2022081420/577c86e21a28abe054c2f674/html5/thumbnails/27.jpg)
• Intervention occurs at time period t1
• True effect of law– Ya – Yb
• Only have data at t1 and t2
– If using time series, estimate Yt1 – Yt2
• Solution?
27
![Page 28: Two Way Fixed Effect Models](https://reader035.vdocuments.site/reader035/viewer/2022081420/577c86e21a28abe054c2f674/html5/thumbnails/28.jpg)
Difference in difference models
• Basic two-way fixed effects model– Cross section and time fixed effects
• Use time series of untreated group to establish what would have occurred in the absence of the intervention
• Key concept: can control for the fact that the intervention is more likely in some types of states
28
![Page 29: Two Way Fixed Effect Models](https://reader035.vdocuments.site/reader035/viewer/2022081420/577c86e21a28abe054c2f674/html5/thumbnails/29.jpg)
Three different presentations
• Tabular• Graphical• Regression equation
29
![Page 30: Two Way Fixed Effect Models](https://reader035.vdocuments.site/reader035/viewer/2022081420/577c86e21a28abe054c2f674/html5/thumbnails/30.jpg)
Difference in Difference
BeforeChange
AfterChange Difference
Group 1(Treat)
Yt1 Yt2 ΔYt
= Yt2-Yt1
Group 2(Control)
Yc1 Yc2 ΔYc
=Yc2-Yc1
Difference ΔΔYΔYt – ΔYc
30
![Page 31: Two Way Fixed Effect Models](https://reader035.vdocuments.site/reader035/viewer/2022081420/577c86e21a28abe054c2f674/html5/thumbnails/31.jpg)
time
Y
t1 t2
Yt1
Yt2
treatment
control
Yc1
Yc2
Treatment effect=(Yt2-Yt1) – (Yc2-Yc1)
31
![Page 32: Two Way Fixed Effect Models](https://reader035.vdocuments.site/reader035/viewer/2022081420/577c86e21a28abe054c2f674/html5/thumbnails/32.jpg)
Key Assumption
• Control group identifies the time path of outcomes that would have happened in the absence of the treatment
• In this example, Y falls by Yc2-Yc1 even without the intervention
• Note that underlying ‘levels’ of outcomes are not important (return to this in the regression equation)
32
![Page 33: Two Way Fixed Effect Models](https://reader035.vdocuments.site/reader035/viewer/2022081420/577c86e21a28abe054c2f674/html5/thumbnails/33.jpg)
time
Y
t1 t2
Yt1
Yt2
treatment
control
Yc1
Yc2
Treatment effect=(Yt2-Yt1) – (Yc2-Yc1)
TreatmentEffect
33
![Page 34: Two Way Fixed Effect Models](https://reader035.vdocuments.site/reader035/viewer/2022081420/577c86e21a28abe054c2f674/html5/thumbnails/34.jpg)
• In contrast, what is key is that the time trends in the absence of the intervention are the same in both groups
• If the intervention occurs in an area with a different trend, will under/over state the treatment effect
• In this example, suppose intervention occurs in area with faster falling Y
34
![Page 35: Two Way Fixed Effect Models](https://reader035.vdocuments.site/reader035/viewer/2022081420/577c86e21a28abe054c2f674/html5/thumbnails/35.jpg)
time
Y
t1 t2
Yt1
Yt2
treatment
control
Yc1
Yc2
True treatment effect
Estimated treatment
TrueTreatmentEffect
35
![Page 36: Two Way Fixed Effect Models](https://reader035.vdocuments.site/reader035/viewer/2022081420/577c86e21a28abe054c2f674/html5/thumbnails/36.jpg)
Basic Econometric Model
• Data varies by – state (i)– time (t)– Outcome is Yit
• Only two periods• Intervention will occur in a group of
observations (e.g. states, firms, etc.)
36
![Page 37: Two Way Fixed Effect Models](https://reader035.vdocuments.site/reader035/viewer/2022081420/577c86e21a28abe054c2f674/html5/thumbnails/37.jpg)
• Three key variables– Tit =1 if obs i belongs in the state that will
eventually be treated– Ait =1 in the periods when treatment occurs
– TitAit -- interaction term, treatment states after the intervention
• Yit = β0 + β1Tit + β2Ait + β3TitAit + εit
37
![Page 38: Two Way Fixed Effect Models](https://reader035.vdocuments.site/reader035/viewer/2022081420/577c86e21a28abe054c2f674/html5/thumbnails/38.jpg)
Yit = β0 + β1Tit + β2Ait + β3TitAit + εit
BeforeChange
AfterChange Difference
Group 1(Treat)
β0+ β1 β0+ β1+ β2+ β3 ΔYt
= β2+ β3
Group 2(Control)
β0 β0+ β2 ΔYc
= β2
Difference ΔΔY = β3
38
![Page 39: Two Way Fixed Effect Models](https://reader035.vdocuments.site/reader035/viewer/2022081420/577c86e21a28abe054c2f674/html5/thumbnails/39.jpg)
More general model
• Data varies by – state (i)– time (t)– Outcome is Yit
• Many periods• Intervention will occur in a group of states
but at a variety of times
39
![Page 40: Two Way Fixed Effect Models](https://reader035.vdocuments.site/reader035/viewer/2022081420/577c86e21a28abe054c2f674/html5/thumbnails/40.jpg)
• ui is a state effect
• vt is a complete set of year (time) effects• Analysis of covariance model
• Yit = β0 + β3 TitAit + ui + vt + εit
40
![Page 41: Two Way Fixed Effect Models](https://reader035.vdocuments.site/reader035/viewer/2022081420/577c86e21a28abe054c2f674/html5/thumbnails/41.jpg)
What is nice about the model
• Suppose interventions are not random but systematic– Occur in states with higher or lower average Y– Occur in time periods with different Y’s
• This is captured by the inclusion of the state/time effects – allows covariance between – ui and TitAit
– vt and TitAit
41
![Page 42: Two Way Fixed Effect Models](https://reader035.vdocuments.site/reader035/viewer/2022081420/577c86e21a28abe054c2f674/html5/thumbnails/42.jpg)
• Group effects – Capture differences across groups that are
constant over time• Year effects
– Capture differences over time that are common to all groups
42
![Page 43: Two Way Fixed Effect Models](https://reader035.vdocuments.site/reader035/viewer/2022081420/577c86e21a28abe054c2f674/html5/thumbnails/43.jpg)
Meyer et al.
• Workers’ compensation– State run insurance program– Compensate workers for medical expenses
and lost work due to on the job accident• Premiums
– Paid by firms– Function of previous claims and wages paid
• Benefits -- % of income w/ cap
43
![Page 44: Two Way Fixed Effect Models](https://reader035.vdocuments.site/reader035/viewer/2022081420/577c86e21a28abe054c2f674/html5/thumbnails/44.jpg)
• Typical benefits schedule– Min( pY,C)– P=percent replacement– Y = earnings– C = cap
– e.g., 65% of earnings up to $400/week
44
![Page 45: Two Way Fixed Effect Models](https://reader035.vdocuments.site/reader035/viewer/2022081420/577c86e21a28abe054c2f674/html5/thumbnails/45.jpg)
• Concern: – Moral hazard. Benefits will discourage return to work
• Empirical question: duration/benefits gradient• Previous estimates
– Regress duration (y) on replaced wages (x)• Problem:
– given progressive nature of benefits, replaced wages reveal a lot about the workers
– Replacement rates higher in higher wage states
45
![Page 46: Two Way Fixed Effect Models](https://reader035.vdocuments.site/reader035/viewer/2022081420/577c86e21a28abe054c2f674/html5/thumbnails/46.jpg)
• Yi = Xiβ + αRi + εi
• Y (duration)• R (replacement rate)• Expect α > 0• Expect Cov(Ri, εi)
– Higher wage workers have lower R and higher duration (understate)
– Higher wage states have longer duration and longer R (overstate)
46
![Page 47: Two Way Fixed Effect Models](https://reader035.vdocuments.site/reader035/viewer/2022081420/577c86e21a28abe054c2f674/html5/thumbnails/47.jpg)
Solution
• Quasi experiment in KY and MI• Increased the earnings cap
– Increased benefit for high-wage workers • (Treatment)
– Did nothing to those already below original cap (comparison)
• Compare change in duration of spell before and after change for these two groups
47
![Page 48: Two Way Fixed Effect Models](https://reader035.vdocuments.site/reader035/viewer/2022081420/577c86e21a28abe054c2f674/html5/thumbnails/48.jpg)
48
![Page 49: Two Way Fixed Effect Models](https://reader035.vdocuments.site/reader035/viewer/2022081420/577c86e21a28abe054c2f674/html5/thumbnails/49.jpg)
49
![Page 50: Two Way Fixed Effect Models](https://reader035.vdocuments.site/reader035/viewer/2022081420/577c86e21a28abe054c2f674/html5/thumbnails/50.jpg)
Model
• Yit = duration of spell on WC
• Ait = period after benefits hike
• Hit = high earnings group (Income>E3)
• Yit = β0 + β1Hit + β2Ait + β3AitHit + β4Xit’ + εit
• Diff-in-diff estimate is β3
50
![Page 51: Two Way Fixed Effect Models](https://reader035.vdocuments.site/reader035/viewer/2022081420/577c86e21a28abe054c2f674/html5/thumbnails/51.jpg)
51
![Page 52: Two Way Fixed Effect Models](https://reader035.vdocuments.site/reader035/viewer/2022081420/577c86e21a28abe054c2f674/html5/thumbnails/52.jpg)
Questions to ask?
• What parameter is identified by the quasi-experiment? Is this an economically meaningful parameter?
• What assumptions must be true in order for the model to provide and unbiased estimate of β3?
• Do the authors provide any evidence supporting these assumptions?
52
![Page 53: Two Way Fixed Effect Models](https://reader035.vdocuments.site/reader035/viewer/2022081420/577c86e21a28abe054c2f674/html5/thumbnails/53.jpg)
Tyler et al.
• Impact of GED on wages• General education development degree• Earn a HS degree by passing an exam• Exam pass rates vary by state• Introduced in 1942 as a way for veterans
to earn a HS degree • Has expanded to the general public
53
![Page 54: Two Way Fixed Effect Models](https://reader035.vdocuments.site/reader035/viewer/2022081420/577c86e21a28abe054c2f674/html5/thumbnails/54.jpg)
• In 1996, 760K dropouts attempted the exam
• Little human capital generated by studying for the exam
• Really measures stock of knowledge• However, passing may ‘signal’ something
about ability
54
![Page 55: Two Way Fixed Effect Models](https://reader035.vdocuments.site/reader035/viewer/2022081420/577c86e21a28abe054c2f674/html5/thumbnails/55.jpg)
Identification strategy
• Use variation across states in pass rates to identify benefit of a GED
• High scoring people would have passed the exam regardless of what state they lived in
• Low scoring people are similar across states, but on is granted a GED and the other is not
55
![Page 56: Two Way Fixed Effect Models](https://reader035.vdocuments.site/reader035/viewer/2022081420/577c86e21a28abe054c2f674/html5/thumbnails/56.jpg)
NY CT
A B
DC
E F
Incr
easi
ng s
core
s
Passing Scores CT
Passing score NY
56
![Page 57: Two Way Fixed Effect Models](https://reader035.vdocuments.site/reader035/viewer/2022081420/577c86e21a28abe054c2f674/html5/thumbnails/57.jpg)
• Groups A and B pass in either state• Group D passes in CT but not in NY• Group C looks similar to D except it does
not pass
57
![Page 58: Two Way Fixed Effect Models](https://reader035.vdocuments.site/reader035/viewer/2022081420/577c86e21a28abe054c2f674/html5/thumbnails/58.jpg)
• What is impact of passing the GED• Yis=earnings of person i in state s
• Lis = earned a low score
• CTis = 1 if live in a state with a generous passing score
• Yis = β0 + Lisβ1 + CTβ2 + LisCTis β3 + εis
58
![Page 59: Two Way Fixed Effect Models](https://reader035.vdocuments.site/reader035/viewer/2022081420/577c86e21a28abe054c2f674/html5/thumbnails/59.jpg)
Difference in Difference
CT NYDifference
Test score is low
D C (D-C)
Test score is high
B A (B-A)
Difference (D-C) – (B-A)
59
![Page 60: Two Way Fixed Effect Models](https://reader035.vdocuments.site/reader035/viewer/2022081420/577c86e21a28abe054c2f674/html5/thumbnails/60.jpg)
How do you get the data
• From ETS (testing agency) get social security numbers (SSN) of test takes, some demographic data, state, and test score
• Give Social Security Admin. a list of SSNs by group (low score in CT, high score in NY)
• SSN gives you back mean, std.dev. # obs per cell
60
![Page 61: Two Way Fixed Effect Models](https://reader035.vdocuments.site/reader035/viewer/2022081420/577c86e21a28abe054c2f674/html5/thumbnails/61.jpg)
61
![Page 62: Two Way Fixed Effect Models](https://reader035.vdocuments.site/reader035/viewer/2022081420/577c86e21a28abe054c2f674/html5/thumbnails/62.jpg)
62
![Page 63: Two Way Fixed Effect Models](https://reader035.vdocuments.site/reader035/viewer/2022081420/577c86e21a28abe054c2f674/html5/thumbnails/63.jpg)
More general model
• Many within group estimators that do not have the nice discrete treatments outlined above are also called difference in difference models
• Cook and Tauchen. Examine impact of alcohol taxes on heavy drinking
• States tax alcohol vary over time• Examine impact on consumption and results of
heavy consumption death due to liver cirrhosis
63
![Page 64: Two Way Fixed Effect Models](https://reader035.vdocuments.site/reader035/viewer/2022081420/577c86e21a28abe054c2f674/html5/thumbnails/64.jpg)
• Yit = β0 + β1 INCit + β2 INCit-1
+ β1 TAXit + β2 TAXit-1 + ui + vt + εit
• i is state, t is year• Yit is per capita alcohol consumption• INC is per capita income• TAX is tax paid per gallon of alcohol
64
![Page 65: Two Way Fixed Effect Models](https://reader035.vdocuments.site/reader035/viewer/2022081420/577c86e21a28abe054c2f674/html5/thumbnails/65.jpg)
65
![Page 66: Two Way Fixed Effect Models](https://reader035.vdocuments.site/reader035/viewer/2022081420/577c86e21a28abe054c2f674/html5/thumbnails/66.jpg)
66
![Page 67: Two Way Fixed Effect Models](https://reader035.vdocuments.site/reader035/viewer/2022081420/577c86e21a28abe054c2f674/html5/thumbnails/67.jpg)
Some Keys
• Model requires that untreated groups provide estimate of baseline trend would have been in the absence of intervention
• Key – find adequate comparisons• If trends are not aligned, cov(TitAit,εit) ≠0
– Omitted variables bias• How do you know you have adequate
comparison sample?67
![Page 68: Two Way Fixed Effect Models](https://reader035.vdocuments.site/reader035/viewer/2022081420/577c86e21a28abe054c2f674/html5/thumbnails/68.jpg)
• Do the pre-treatment samples look similar– Tricky. D-in-D model does not require means
match – only trends.– If means match, no guarantee trends will– However, if means differ, aren’t you
suspicious that trends will as well?
68
![Page 69: Two Way Fixed Effect Models](https://reader035.vdocuments.site/reader035/viewer/2022081420/577c86e21a28abe054c2f674/html5/thumbnails/69.jpg)
Develop tests that can falsify model
• Yit = β0 + β3 TitAit + ui + vt + εit
• Will provide unbiased estimate so long as cov(TitAit, εit)=0
• Concern: suppose that the intervention is more likely in a state with a different trend
• If true, coefficient may ‘show up’ prior to the intervention
69
![Page 70: Two Way Fixed Effect Models](https://reader035.vdocuments.site/reader035/viewer/2022081420/577c86e21a28abe054c2f674/html5/thumbnails/70.jpg)
• Add “leads” to the model for the treatment• Intervention should not change outcomes
before it appears• If it does, then suspicious that covariance
between trends and intervention
70
![Page 71: Two Way Fixed Effect Models](https://reader035.vdocuments.site/reader035/viewer/2022081420/577c86e21a28abe054c2f674/html5/thumbnails/71.jpg)
• Yit = β0 + β3 TitAit + α1TitAit+1 + α2 TitAit+2 + α3TitAit+3 + ui + vt + εit
• Three “leads”• Test null: Ho: α1=α2=α3=0
71
![Page 72: Two Way Fixed Effect Models](https://reader035.vdocuments.site/reader035/viewer/2022081420/577c86e21a28abe054c2f674/html5/thumbnails/72.jpg)
Grinols and Mustard
• Impact of a casino opening on crime rates• Concern: casinos are not random –
opened in struggling areas• Data at county/year level – simple dummy
that equals 1 in year of intervention, =0 otherwise
72
![Page 73: Two Way Fixed Effect Models](https://reader035.vdocuments.site/reader035/viewer/2022081420/577c86e21a28abe054c2f674/html5/thumbnails/73.jpg)
73
, ,,
0 /1
it it it i t it
it
i t
it
it
C A L u v
C crime rate county i year tu v county and year effectsL vector of dummies for lawsA county characteristics
![Page 74: Two Way Fixed Effect Models](https://reader035.vdocuments.site/reader035/viewer/2022081420/577c86e21a28abe054c2f674/html5/thumbnails/74.jpg)
74
![Page 75: Two Way Fixed Effect Models](https://reader035.vdocuments.site/reader035/viewer/2022081420/577c86e21a28abe054c2f674/html5/thumbnails/75.jpg)
75
![Page 76: Two Way Fixed Effect Models](https://reader035.vdocuments.site/reader035/viewer/2022081420/577c86e21a28abe054c2f674/html5/thumbnails/76.jpg)
76
![Page 77: Two Way Fixed Effect Models](https://reader035.vdocuments.site/reader035/viewer/2022081420/577c86e21a28abe054c2f674/html5/thumbnails/77.jpg)
Pick control groups that have similar pre-treatment trends
• Most studies pick all untreated data as controls– Example: Some states raise cigarette taxes.
Use states that do not change taxes as controls
– Example: Some states adopt welfare reform prior to TANF. Use all non-reform states as controls
• Intuitive but not likely correct 77
![Page 78: Two Way Fixed Effect Models](https://reader035.vdocuments.site/reader035/viewer/2022081420/577c86e21a28abe054c2f674/html5/thumbnails/78.jpg)
• Can use econometric procedure to pick controls
• Appealing if interventions are discrete and few in number
• Easy to identify pre-post
78
![Page 79: Two Way Fixed Effect Models](https://reader035.vdocuments.site/reader035/viewer/2022081420/577c86e21a28abe054c2f674/html5/thumbnails/79.jpg)
Card and Sullivan
• Examine the impact of job training• Some men are treated with job skills,
others are not• Most are low skill men, high
unemployment, frequent movement in and out of work
• Eight quarters of pre-treatment data for treatment and controls
79
![Page 80: Two Way Fixed Effect Models](https://reader035.vdocuments.site/reader035/viewer/2022081420/577c86e21a28abe054c2f674/html5/thumbnails/80.jpg)
• Let Yit =1 if “i” worked in time t• There is then an eight digit sequence of
outcomes• “11110000” or “10100111”• Men with same 8 digit pre-treatment
sequence will form control for the treated• People with same pre-treatment time
series are ‘matched’80
![Page 81: Two Way Fixed Effect Models](https://reader035.vdocuments.site/reader035/viewer/2022081420/577c86e21a28abe054c2f674/html5/thumbnails/81.jpg)
• Intuitively appealing and simple procedure• Does not guarantee that post treatment
trends would be the same but, this is the best you have.
81
![Page 82: Two Way Fixed Effect Models](https://reader035.vdocuments.site/reader035/viewer/2022081420/577c86e21a28abe054c2f674/html5/thumbnails/82.jpg)
More systematic model
• Data varies by individual (i), state (s), time• Intervention is in a particular state
• Yist = β0 + Xist β2+ β3 TstAst + us + vt + εist
• Many states available to be controls• How do you pick them?
82
![Page 83: Two Way Fixed Effect Models](https://reader035.vdocuments.site/reader035/viewer/2022081420/577c86e21a28abe054c2f674/html5/thumbnails/83.jpg)
• Restrict sample to pre-treatment period• State 1 is the treated state• State k is a potential control• Run data with only these two states• Estimate separate year effects for the
treatment state• If you cannot reject null that the year
effects are the same, use as control83
![Page 84: Two Way Fixed Effect Models](https://reader035.vdocuments.site/reader035/viewer/2022081420/577c86e21a28abe054c2f674/html5/thumbnails/84.jpg)
• Unrestricted model• Pretreatment years so TstAst not in model• M pre-treatment years• Let Wt=1 if obs from year t
• Yist = α0 + Xist α2+ Σt=2γtWt + Σt=2 λt TiWt + us + εist
• Ho: λ2= λ3=… λm=084
![Page 85: Two Way Fixed Effect Models](https://reader035.vdocuments.site/reader035/viewer/2022081420/577c86e21a28abe054c2f674/html5/thumbnails/85.jpg)
85
![Page 86: Two Way Fixed Effect Models](https://reader035.vdocuments.site/reader035/viewer/2022081420/577c86e21a28abe054c2f674/html5/thumbnails/86.jpg)
Acemoglu and Angrist
ada_jpe.doada_jpe.log
86
![Page 87: Two Way Fixed Effect Models](https://reader035.vdocuments.site/reader035/viewer/2022081420/577c86e21a28abe054c2f674/html5/thumbnails/87.jpg)
Americans with Disability Act
• Requires that employers accommodate disabled workers
• Outlaws discrimination based on disabilities
• Passes in July 1990, effective July 1992• May discourage employment of disabled
– Costs of accommodations– Maybe more difficult to fire disabled
87
![Page 88: Two Way Fixed Effect Models](https://reader035.vdocuments.site/reader035/viewer/2022081420/577c86e21a28abe054c2f674/html5/thumbnails/88.jpg)
Econometric model
• Difference in difference• Have data before/after law goes into effect• Treated group – disabled • Control – non-disabled• Treatment variable is interaction
– Diabled * 1992 and after
88
![Page 89: Two Way Fixed Effect Models](https://reader035.vdocuments.site/reader035/viewer/2022081420/577c86e21a28abe054c2f674/html5/thumbnails/89.jpg)
• Yit = Xitπ + Diδ + Yeartγt + Yeart Ditαt + εit
• Yit = labor market outcome, person i year t• Xit vector of individual characteristics • Dit =1 if disableld• Yeart = year effect• Yeart Dit = complete set of year x disability
interactions
89
![Page 90: Two Way Fixed Effect Models](https://reader035.vdocuments.site/reader035/viewer/2022081420/577c86e21a28abe054c2f674/html5/thumbnails/90.jpg)
• Coef on αi’s should be zero before the law• May be non zero for years>=1992
90
![Page 91: Two Way Fixed Effect Models](https://reader035.vdocuments.site/reader035/viewer/2022081420/577c86e21a28abe054c2f674/html5/thumbnails/91.jpg)
91
![Page 92: Two Way Fixed Effect Models](https://reader035.vdocuments.site/reader035/viewer/2022081420/577c86e21a28abe054c2f674/html5/thumbnails/92.jpg)
92
![Page 93: Two Way Fixed Effect Models](https://reader035.vdocuments.site/reader035/viewer/2022081420/577c86e21a28abe054c2f674/html5/thumbnails/93.jpg)
Data
• March CPS• Asks all participants employment/income
data for the previous year– Earnings, weeks worked, usual hours/week
• Data from 1988-1997 March CPS– Data for calendar years 1987-1996
• Men and women, aged 21-58• Generate results for various subsamples
93
![Page 94: Two Way Fixed Effect Models](https://reader035.vdocuments.site/reader035/viewer/2022081420/577c86e21a28abe054c2f674/html5/thumbnails/94.jpg)
. * get work year and region fixed effects;
. xi i.yearw i.region i.age; i.yearw _Iyearw_1987-1996 (naturally coded; _Iyearw_1987 omitted) i.region _Iregion_11-42 (naturally coded; _Iregion_11 omitted) i.age _Iage_21-39 (naturally coded; _Iage_21 omitted) . * the authors interact the disabled dummy with all year effect; . * and include all interactions in the model. if the d-in-d; . * assumptions are correct, the interactions prior to 1992 should; . * all be zero; . gen d_y88=_Iyearw_1988*disabled; . (repeated text deleted) . . gen d_y94=_Iyearw_1994*disabled; . gen d_y95=_Iyearw_1995*disabled; . gen d_y96=_Iyearw_1996*disabled;
Constructs sets of dummiesFor year, region and age
Generate year x Disabilityinteractions
94
![Page 95: Two Way Fixed Effect Models](https://reader035.vdocuments.site/reader035/viewer/2022081420/577c86e21a28abe054c2f674/html5/thumbnails/95.jpg)
Table 2
ADA not in effect
Effective years of ADA
95
![Page 96: Two Way Fixed Effect Models](https://reader035.vdocuments.site/reader035/viewer/2022081420/577c86e21a28abe054c2f674/html5/thumbnails/96.jpg)
Model with few controlsAfter adding extensive list
Of controls, results change little 96
![Page 97: Two Way Fixed Effect Models](https://reader035.vdocuments.site/reader035/viewer/2022081420/577c86e21a28abe054c2f674/html5/thumbnails/97.jpg)
reg wkswork1 _Iy* disabled d_y*;
Include all variablesthat begin with_ly
Include all variablesthat begin with d_y
97
![Page 98: Two Way Fixed Effect Models](https://reader035.vdocuments.site/reader035/viewer/2022081420/577c86e21a28abe054c2f674/html5/thumbnails/98.jpg)
. * run basic diff-in-diff model, column 2, table 3; . * do not control for covariates; . reg wkswork1 _Iy* disabled d_y*; Source | SS df MS Number of obs = 195714 -------------+------------------------------ F( 19,195694) = 1346.15 Model | 6036918.11 19 317732.532 Prob > F = 0.0000 Residual | 46189618.9195694 236.029816 R-squared = 0.1156 -------------+------------------------------ Adj R-squared = 0.1155 Total | 52226537195713 266.852672 Root MSE = 15.363 ------------------------------------------------------------------------------ wkswork1 | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------- Year effects 1988 – 1996 delete disabled | -23.7888 .500911 -47.49 0.000 -24.77057 -22.80703 d_y88 | -.7371178 .7328373 -1.01 0.314 -2.173461 .6992259 d_y89 | -.7552183 .7189482 -1.05 0.294 -2.16434 .653903 d_y90 | -2.612262 .7073555 -3.69 0.000 -3.998661 -1.225862 d_y91 | -2.176184 .7040983 -3.09 0.002 -3.556199 -.7961677 d_y92 | -1.567489 .700199 -2.24 0.025 -2.939862 -.1951153 d_y93 | -3.113591 .707372 -4.40 0.000 -4.500023 -1.727159 d_y94 | -4.044365 .7328552 -5.52 0.000 -5.480743 -2.607986 d_y95 | -3.563268 .7626032 -4.67 0.000 -5.057952 -2.068584 d_y96 | -4.472773 .7514502 -5.95 0.000 -5.945597 -2.999948 _cons | 43.86073 .1085045 404.23 0.000 43.64807 44.0734 ------------------------------------------------------------------------------
Need to delete one year effectSince constant is in model
Disability main effect
Disability law interactions
# obs close to what is Reported in paper
98
![Page 99: Two Way Fixed Effect Models](https://reader035.vdocuments.site/reader035/viewer/2022081420/577c86e21a28abe054c2f674/html5/thumbnails/99.jpg)
Run different model
• One treatment variable: Disabled x after 1991
• . gen ada=yearw>=1992;• . gen treatment=ada*disabled;
• Add year effects to model, disabled, them ADA x disabled interaction
99
![Page 100: Two Way Fixed Effect Models](https://reader035.vdocuments.site/reader035/viewer/2022081420/577c86e21a28abe054c2f674/html5/thumbnails/100.jpg)
. * run basic diff-in-diff model, column 2, table 3;
. * do not control for covariates;
. * have only one treatment variable;
. reg wkswork1 _Iy* disabled treatment; Source | SS df MS Number of obs = 195714 -------------+------------------------------ F( 11,195702) = 2321.35 Model | 6027911.45 11 547991.95 Prob > F = 0.0000 Residual | 46198625.5195702 236.06619 R-squared = 0.1154 -------------+------------------------------ Adj R-squared = 0.1154 Total | 52226537195713 266.852672 Root MSE = 15.364 ------------------------------------------------------------------------------ wkswork1 | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------- _Iyearw_1988 | .3950318 .1526629 2.59 0.010 .0958162 .6942475 Do not show all year effects _Iyearw_1996 | 1.293786 .1604476 8.06 0.000 .9793123 1.608259 disabled | -25.07033 .2274473 -110.22 0.000 -25.51612 -24.62454 treatment | -1.970964 .3280719 -6.01 0.000 -2.613977 -1.327951 _cons | 43.92087 .1064727 412.51 0.000 43.71218 44.12955 ------------------------------------------------------------------------------
ADA reduced work by almost 2 weeks/year
Regression statement
100
![Page 101: Two Way Fixed Effect Models](https://reader035.vdocuments.site/reader035/viewer/2022081420/577c86e21a28abe054c2f674/html5/thumbnails/101.jpg)
Should you cluster?
• Intervention varies by year/disability• Should be within-year correlation in errors• People are in the sample two years in a
row so there should be some correlation over time
• Cannot cluster on years since # groups too small
101
![Page 102: Two Way Fixed Effect Models](https://reader035.vdocuments.site/reader035/viewer/2022081420/577c86e21a28abe054c2f674/html5/thumbnails/102.jpg)
• Need larger set that makes sense• Two options (many more)
– Cluster on state– Cluster on state/disability
102
![Page 103: Two Way Fixed Effect Models](https://reader035.vdocuments.site/reader035/viewer/2022081420/577c86e21a28abe054c2f674/html5/thumbnails/103.jpg)
• . gen disabled_state=100*disabled+statefip;
• reg wkswork1 _Ia* _Iy* _Ir* white black hispanic lths hsgrad somecol disabled treatment, cluster(statefip);
• .reg wkswork1 _Ia* _Iy* _Ir* white black hispanic lths hsgrad somecol disabled treatment, cluster(disabled_state);
103
![Page 104: Two Way Fixed Effect Models](https://reader035.vdocuments.site/reader035/viewer/2022081420/577c86e21a28abe054c2f674/html5/thumbnails/104.jpg)
Summary of results for cluster
• Coefficient on treatment (standard error)– Regular OLS -1.998 (0.315)– Cluster by state: -1.998 (0.487)– Cluster by state/disab. -1.998 (0.532)
104
![Page 105: Two Way Fixed Effect Models](https://reader035.vdocuments.site/reader035/viewer/2022081420/577c86e21a28abe054c2f674/html5/thumbnails/105.jpg)
Dranove et al.
105
![Page 106: Two Way Fixed Effect Models](https://reader035.vdocuments.site/reader035/viewer/2022081420/577c86e21a28abe054c2f674/html5/thumbnails/106.jpg)
Introduction
• Increased use of report cards, especially in health care and education
• Two best examples:– NCLB legislation for education– NY’s publication of coronary artery bypass
graft (CABG) mortality rates for surgeons and hospitals
106
![Page 107: Two Way Fixed Effect Models](https://reader035.vdocuments.site/reader035/viewer/2022081420/577c86e21a28abe054c2f674/html5/thumbnails/107.jpg)
Disagreement about usefulness• For: Better informed consumers make better
decisions, makes markets more efficient– Choose best doctors– Provides incentives for schools and doc’s to
improve care• Against
– May give incomplete evidence. Can risk adjust but not on all characteristics
– Doc’s can manipulate rankings by selecting patients with the highest expected success rate, decreasing access to care for the sickest patients
107
![Page 108: Two Way Fixed Effect Models](https://reader035.vdocuments.site/reader035/viewer/2022081420/577c86e21a28abe054c2f674/html5/thumbnails/108.jpg)
This paper• Uses data on al heart attack patients in Medicare
in from 1987-94• Impact of reports cards in NY and PA• Examines three sets of outcomes associated with
report cards– Matching of patients to providers: is there a match of
the sickest patients to best providers?– Incidence and quantity of CABG
• Do total surgeries go up or down?• Shift to healthier patients?
– Is there a substitution into other forms of treatment NOT measured by the report card?
108
![Page 109: Two Way Fixed Effect Models](https://reader035.vdocuments.site/reader035/viewer/2022081420/577c86e21a28abe054c2f674/html5/thumbnails/109.jpg)
Report Cards
• NY– Hospital specific, risk adjusted CABG
mortality rates based on 1990– Physician specific rates in 1992
• PA – hospital specific data in 1992• Effective dates – impact patient decision
making in 1991 (NY) and 1993 (PA) concerning hospitals, 1993 in both states for physicians
109
![Page 110: Two Way Fixed Effect Models](https://reader035.vdocuments.site/reader035/viewer/2022081420/577c86e21a28abe054c2f674/html5/thumbnails/110.jpg)
Data• Population potentially impacted are those
with acute myocardial infarctions (AMI) in Medicare
• Easily obtained from Medicare claims data• Large fraction treated with CABG• Selection into the sample unlikely impacted
by report cards• Physicians treating AMI likely to have
multiple treatment options (e.g., heart cath., medical treatment, etc.)
110
![Page 111: Two Way Fixed Effect Models](https://reader035.vdocuments.site/reader035/viewer/2022081420/577c86e21a28abe054c2f674/html5/thumbnails/111.jpg)
Hospital Model
111
ln( )
, ,
, ,
.,
lst s t lst st st lst
lst
s t
lst
st
st
h A B Z g L p N q e
l hospital s state t timeh mean hospital level severity AMI patientsA B are state time effectsZ are hospital characteristicsN is a polynomial in no of hospitalsL law dummy
1 91 , 93in in NY in PA
![Page 112: Two Way Fixed Effect Models](https://reader035.vdocuments.site/reader035/viewer/2022081420/577c86e21a28abe054c2f674/html5/thumbnails/112.jpg)
Individual model
112
)
, ,1 /
, ,
, 193 /
kst s t kst st kst
kst
s t
kst
st
C A B Z g L p e
k person s state t timeC if patient had CABG w in year of AMIA B are state time effectsZ are person characteristicsL law dummy in both NY PA
![Page 113: Two Way Fixed Effect Models](https://reader035.vdocuments.site/reader035/viewer/2022081420/577c86e21a28abe054c2f674/html5/thumbnails/113.jpg)
113
![Page 114: Two Way Fixed Effect Models](https://reader035.vdocuments.site/reader035/viewer/2022081420/577c86e21a28abe054c2f674/html5/thumbnails/114.jpg)
114
![Page 115: Two Way Fixed Effect Models](https://reader035.vdocuments.site/reader035/viewer/2022081420/577c86e21a28abe054c2f674/html5/thumbnails/115.jpg)
115
![Page 116: Two Way Fixed Effect Models](https://reader035.vdocuments.site/reader035/viewer/2022081420/577c86e21a28abe054c2f674/html5/thumbnails/116.jpg)
116