Lec9v11 Panel Data Models
Lec9v11 Panel Data Models
Anbes Tenaye
[email protected]
Hawassa University, CA, FEGDS
Dept. of Agricultural Economics
Yi = 0 + 1 Xi + ui
Omitted variables
Yi = 0 + 1 X 1i + 2 X 2i + 3 X 3i + ... + k Xki + ui
Panel data
Cross-sectional data:
2010
2010
2011
2012
5
• More observations.
• We have data on traffic fatality rate and tax on beer for 48 U.S. states in
1982 and 1988.
• What is the effect of increasing the tax on beer on the traffic fatality rate?
8
0 .5 1 1.5 2 2.5 3
Tax on beer (in real dollars)
\ i,1982
FatalityRate = 2.01 + 0.15 BeerTaxi,1982
(0.14) (0.18)
9
0 .5 1 1.5 2 2.5
Tax on beer (in real dollars)
\ i,1988
FatalityRate = 1.86 + 0.44 BeerTaxi,1988
(0.11) (0.16)
10
• Both regression using data from 1982 & 1988 likely suffer from omitted
variable bias
• We can use data from 1982 and 1988 together as panel data
• Suppose model is
• Zi are (unobserved) variables that vary between states but not over time
• (such as local cultural attitude towards drinking and driving)
• Parameter of interest is 1
11
Panel data
12
• We also observe Yi2 and Xi2 , hence model for second period is:
• We have
Yi1 = 0 + 1 Xi1 + 2 Zi + ui1
and
Yi2 = 0 + 1 Xi2 + 2 Zi + ui2
• Subtracting period 1 from period 2 gives
.2 .4 .6 .8
Fatality rate 1988 − Fatatlity rate 1982
−1.4−1.2 −1 −.8 −.6 −.4 −.2 0
\
Fatalityi,1988 Fatalityi,1982 = 0.07 1.04 (BeerTaxi,1988 BeerTaxi,1982 )
(0.06) (0.42)
16
4
3.5
Predicted fatality rate
3
2.5
2
1.5
1
.5
0
0 .5 1 1.5 2 2.5 3
beer tax
Alabama Arizona
Arkansa California
19
n X
X T ⇣ ⌘2
Yit ˆ0 ˆ1 Xit ˆ2 D2i ... ˆn Dni
i=1 t=1
OLS procedure:
• Dummy variable trap: Never include all n dummy variables and the
constant term!
23
• With large n computer will face numerical problem when solving system
of n + 1 equations
• We have
(FatalityRate\
it FatalityRate) = 0.66 (BeerTaxit BeerTax)
(0.19)
27
• In addition to entity effects we can also include time effects in the model
• Time effects control for omitted variables that are common to all entities
but vary over time
• Within estimation: Deviating Yit and Xit from their entity and time-period
means
\ it
FatalityRate = 0.64 BeerTaxit + State dummies + Time dummies
(0.20)
29
ASS #2: (Xi1 , ..., XiT , Yi1 , ..., YiT ) are i.i.d. over the cross-section
remarks:
• uit contains time-varying factors that affect the traffic fatality rate (but
that are uncorrelated with the beer tax)
• These omitted factors might for a given entity be correlated over time
• ↵i unobserved ability
• However, in this case panel data does not solve the problem because Xit
typically lacks time series variation (Xit = Xi )
• Yit number of packages per capita in state i in year t, Xit is real tax on
cigarettes in state i in year t
------------------------------------------------------------------------------
lpackpc | Coef. Std. Err. t P>|t| [95% Conf. Interval]
-------------+----------------------------------------------------------------
rtax | -.0156393 .0027975 -5.59 0.000 -.0211946 -.0100839
lperinc | -.0139092 .158696 -0.09 0.930 -.3290481 .3012296
_cons | 5.206614 .3781071 13.77 0.000 4.455769 5.95746
------------------------------------------------------------------------------
37
Before-After estimation
------------------------------------------------------------------------------
diff_lpackpc | Coef. Std. Err. t P>|t| [95% Conf. Interval]
-------------+----------------------------------------------------------------
diff_rtax | -.0169369 .0020119 -8.42 0.000 -.0209865 -.0128872
diff_lperinc | -1.011625 .1325691 -7.63 0.000 -1.278473 -.7447771
stateB14 | 7.798515 .3224854 24.18 0.000 7.149385 8.447644
stateB15 | 7.970896 .3115618 25.58 0.000 7.343755 8.598038 38
Within estimation
. xtreg lpackpc rtax lperinc, fe i(STATE)
F(2,46) = 145.66
corr(u_i, Xb) = -0.5687 Prob > F = 0.0000
------------------------------------------------------------------------------
lpackpc | Coef. Std. Err. t P>|t| [95% Conf. Interval]
-------------+----------------------------------------------------------------
rtax | -.0169369 .0020119 -8.42 0.000 -.0209865 -.0128872
lperinc | -1.011625 .1325691 -7.63 0.000 -1.278473 -.7447771
_cons | 7.856714 .3150362 24.94 0.000 7.222579 8.490849
-------------+----------------------------------------------------------------
sigma_u | .25232518
sigma_e | .07565452
rho | .91751731 (fraction of variance due to u_i)
------------------------------------------------------------------------------
F test that all u_i=0: F(47, 46) = 13.41 Prob > F = 0.0000