Panel Data - Memorial University of Newfoundland
Panel Data - Memorial University of Newfoundland
Panel Data - Memorial University of Newfoundland
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
ECON 4551<br />
Econometrics II<br />
<strong>Memorial</strong> <strong>University</strong> <strong>of</strong> <strong>Newfoundland</strong><br />
<strong>Panel</strong> <strong>Data</strong> Models<br />
Adapted from Vera Tabakova’s notes
• 15.1 Grunfeld’s Investment <strong>Data</strong><br />
• 15.2 Sets <strong>of</strong> Regression Equations<br />
• 15.3 Seemingly Unrelated Regressions<br />
• 15.4 The Fixed Effects Model<br />
• 15.4 The Random Effects Model<br />
• Extensions RCM, dealing with endogeneity when we have<br />
static variables<br />
Principles <strong>of</strong> Econometrics, 3rd Edition<br />
Slide 15-2
The different types <strong>of</strong> panel data sets can be described as:<br />
• “long and narrow,” with “long” time dimension and “narrow”, few<br />
cross sectional units;<br />
• “short and wide,” many units observed over a short period <strong>of</strong> time;<br />
• “long and wide,” indicating that both N and T are relatively large.<br />
Principles <strong>of</strong> Econometrics, 3rd Edition<br />
Slide 15-3
( , )<br />
INV = f V K<br />
it it it<br />
(15.1)<br />
The data consist <strong>of</strong> T = 20 years <strong>of</strong> data (1935-1954) for<br />
N = 10 large firms. Value <strong>of</strong> stock, proxy for expected pr<strong>of</strong>its<br />
Let y it = INV it and x 2it = V it and x 3it = K it<br />
Capital stock, proxy for desired permanent<br />
Capital stock<br />
y =β +β x +β x + e<br />
it 1it 2it 2it 3it 3it it<br />
(15.2)<br />
Notice the subindices! <br />
Principles <strong>of</strong> Econometrics, 3rd Edition<br />
Slide 15-4
INV =β +β V +β K + e t = 1, , 20<br />
GE, t 1 2 GE, t 3 GE, t GE,<br />
t<br />
INV =β +β V +β K + e t = 1, , 20<br />
WE, t 1 2 WE, t 3 WE, t WE,<br />
t<br />
(15.3a)<br />
yit =β<br />
1+β 2x2it +β<br />
3x3it + eit<br />
i= 1, 2; t = 1, , 20<br />
(15.3b)<br />
For simplicity we focus on only two firms<br />
Principles <strong>of</strong> Econometrics, 3rd Edition<br />
GRETL:<br />
smpl firm = 3 || firm = 8 --restrict<br />
Slide 15-5
INV =β +β V +β K + e t = 1, , 20<br />
GE, t 1, GE 2, GE GE, t 3, GE GE, t GE,<br />
t<br />
INV =β +β V +β K + e t = 1, , 20<br />
WE, t 1, WE 2, WE WE, t 3, WE WE, t WE,<br />
t<br />
(15.4a)<br />
yit =β<br />
1i +β<br />
2ix2it +β<br />
3ix3it + eit<br />
i= 1, 2; t = 1, ,<br />
20<br />
(15.4b)<br />
Principles <strong>of</strong> Econometrics, 3rd Edition<br />
Slide 15-6
( ) ( )<br />
2<br />
( )<br />
E e = 0 var e =σ cov e , e = 0<br />
GE, t GE, t GE GE, t GE,<br />
s<br />
( ) ( )<br />
2<br />
( )<br />
E e = 0 var e =σ cov e , e = 0<br />
WE, t WE, t WE WE, t WE,<br />
s<br />
(15.5)<br />
Assumption (15.5) says that the errors in both investment functions<br />
(i) have zero mean,<br />
(ii) are homoskedastic with constant variance, and<br />
(iii) are not correlated over time; autocorrelation does not exist.<br />
2 2<br />
The two equations do have different error variances σ and σ .<br />
GE<br />
WE<br />
Principles <strong>of</strong> Econometrics, 3rd Edition<br />
GRETL<br />
ols Inv const V K<br />
modtest –panel<br />
wrong in posted notes!!!<br />
Slide 15-7
Principles <strong>of</strong> Econometrics, 3rd Edition<br />
Slide 15-8
• Let D i be a dummy variable equal to 1 for the Westinghouse<br />
observations and 0 for the General Electric observations. If the<br />
variances are the same for both firms then we can run:<br />
INV =β +δ D +β V +δ D × V +β K +δ D × K + e<br />
it 1, GE 1 i 2, GE it 2 i it 3, GE it 3 i it it<br />
(15.6)<br />
Principles <strong>of</strong> Econometrics, 3rd Edition<br />
Slide 15-9
So we have two separate stories<br />
Principles <strong>of</strong> Econometrics, 3rd Edition<br />
Slide 15-10
( )<br />
cov e , e = σ<br />
GE, t WE, t GE,<br />
WE<br />
(15.7)<br />
This assumption says that the error terms in the two equations, at the<br />
same point in time, are correlated. This kind <strong>of</strong> correlation is called a<br />
contemporaneous correlation.<br />
Under this assumption, the joint regression would be better than the<br />
separate simple OLS regressions<br />
Principles <strong>of</strong> Econometrics, 3rd Edition<br />
Slide 15-11
(i)<br />
(ii)<br />
Econometric s<strong>of</strong>tware includes commands for SUR (or SURE) that<br />
carry out the following steps:<br />
Estimate the equations separately using least squares;<br />
Use the least squares residuals from step (i) to estimate<br />
σ , σ and σ<br />
2 2<br />
GE WE GE,<br />
WE<br />
;<br />
(iii) Use the estimates from step (ii) to estimate the two equations jointly<br />
within a generalized least squares framework.<br />
Principles <strong>of</strong> Econometrics, 3rd Edition<br />
Slide 15-12
Principles <strong>of</strong> Econometrics, 3rd Edition<br />
Slide 15-13
* Open and summarize data from grunfeld2.gdt (which, luckily for us, is already in<br />
wide format!!!)<br />
open "c:\Program Files\gretl\data\poe\grunfeld2.gdt"<br />
system name="Grunfeld"<br />
equation inv_ge const v_ge k_ge<br />
equation inv_we const v_we k_we<br />
end system<br />
estimate "Grunfeld" method=sur --geomean<br />
Principles <strong>of</strong> Econometrics, 3rd Edition<br />
Slide 15-14
In GRETL the restrict command can be used to impose the cross-equation<br />
restrictions on a system <strong>of</strong> equations that has been previously defined and<br />
named.<br />
The set <strong>of</strong> restrictions is started by restrict and terminated with end restrict.<br />
Each restriction in the set is expressed as an equation. Put the linear combination<br />
<strong>of</strong> parameters to be tested on the left-hand-side <strong>of</strong> the equality and a numeric<br />
value on the right.<br />
Parameters are referenced using b[i,j] where i refers to the equation number in<br />
the system, and j the parameter number.<br />
Principles <strong>of</strong> Econometrics, 3rd Edition<br />
Slide 15-15
estrict "Grunfeld"<br />
b[1,1]-b[2,1]=0<br />
b[1,2]-b[2,2]=0<br />
b[1,3]-b[2,3]=0<br />
end restrict<br />
Principles <strong>of</strong> Econometrics, 3rd Edition<br />
Slide 15-16
There are two situations where separate least squares estimation is<br />
just as good as the SUR technique :<br />
(i)<br />
(ii)<br />
when the equation errors are not contemporaneously correlated;<br />
when the same (the “very same”) explanatory variables appear in<br />
each equation.<br />
If the explanatory variables in each equation are different, then a test<br />
to see if the correlation between the errors is significantly different<br />
from zero is <strong>of</strong> interest.<br />
Principles <strong>of</strong> Econometrics, 3rd Edition<br />
Slide 15-17
• (although text reads 0.729):<br />
r<br />
2<br />
( )<br />
( )( )<br />
2<br />
2<br />
σˆ GE,<br />
WE<br />
207.5871<br />
GE, WE 2 2<br />
σGEσWE<br />
= = =<br />
ˆ ˆ 777.4463 104.3079<br />
0.53139<br />
σ<br />
20 20<br />
1 1<br />
ˆ = ∑eˆ eˆ = ∑eˆ eˆ<br />
−<br />
GEWE , GEt , WEt , GEt , WEt ,<br />
T −K t 1 T 3<br />
GE<br />
T −K WE = t=<br />
1<br />
In this case we have 3 parameters in each equation so:<br />
K<br />
GE<br />
= K = 3.<br />
WE<br />
Principles <strong>of</strong> Econometrics, 3rd Edition<br />
Slide 15-18
Testing for correlated errors for two equations:<br />
H : σ = 0<br />
0 GE,<br />
WE<br />
LM = Tr ∼χ under H .<br />
2 2<br />
GE, WE (1) 0<br />
LM = 10.628 > 3.84 (Breusch-Pagan test <strong>of</strong> independence: chi2(1))<br />
Hence we reject the null hypothesis <strong>of</strong> no correlation between the<br />
errors and conclude that there are potential efficiency gains from<br />
estimating the two investment equations jointly using SUR.<br />
Principles <strong>of</strong> Econometrics, 3rd Edition<br />
Slide 15-19
Testing for correlated errors for three equations:<br />
H0 : σ<br />
12<br />
=σ<br />
13<br />
=σ<br />
23<br />
= 0<br />
( )<br />
LM = T r + r + r χ<br />
2 2 2 2<br />
12 13 23 (3)<br />
Principles <strong>of</strong> Econometrics, 3rd Edition<br />
Slide 15-20
Testing for correlated errors for M equations:<br />
M<br />
i−1<br />
LM T r<br />
= ∑∑<br />
i= 2 j=<br />
1<br />
2<br />
ij<br />
Under the null hypothesis that there are no contemporaneous<br />
correlations, this LM statistic has a χ 2 -distribution with M(M–1)/2<br />
degrees <strong>of</strong> freedom, in large samples.<br />
Principles <strong>of</strong> Econometrics, 3rd Edition<br />
Slide 15-21
H : β =β , β =β , β =β<br />
0 1, GE 1, WE 2, GE 2, WE 3, GE 3, WE<br />
(15.8)<br />
Most econometric s<strong>of</strong>tware will perform an F-test and/or a Wald χ 2 –test; in<br />
the context <strong>of</strong> SUR equations both tests are large sample approximate tests.<br />
The F-statistic has J numerator degrees <strong>of</strong> freedom and (MT−K)<br />
denominator degrees <strong>of</strong> freedom, where J is the number <strong>of</strong> hypotheses, M is<br />
the number <strong>of</strong> equations, and K is the total number <strong>of</strong> coefficients in the<br />
whole system, and T is the number <strong>of</strong> time series observations per equation.<br />
The χ 2 -statistic has J degrees <strong>of</strong> freedom.<br />
Principles <strong>of</strong> Econometrics, 3rd Edition<br />
Slide 15-22
• SUR is OK when the panel is long and narrow, not when it is short and wide.<br />
Consider instead…<br />
y =β +β x +β x + e<br />
it 1it 2it 2it 3it 3it it<br />
(15.9)<br />
We cannot consistently estimate the 3×N×T parameters in (15.9) with<br />
only NT total observations. But we can impose some more<br />
structure…<br />
β =β , β =β , β =β<br />
1it 1i 2it 2 3it<br />
3<br />
(15.10)<br />
We consider only one-way effects and assume a common slope<br />
parameters across cross-sectional units<br />
Principles <strong>of</strong> Econometrics, 3rd Edition<br />
Slide 15-23
All behavioral differences between individual firms and over time are<br />
captured by the intercept. Individual intercepts are included to<br />
“control” for these firm specific differences.<br />
y =β +β x +β x + e<br />
it 1i 2 2it 3 3it it<br />
(15.11)<br />
Principles <strong>of</strong> Econometrics, 3rd Edition<br />
Slide 15-24
⎧1 i= 1 ⎧1 i= 2 ⎧1 i=<br />
3<br />
D1 i<br />
= ⎨ , D2i = ⎨ , D3i<br />
= ⎨ , etc.<br />
⎩0 otherwise ⎩0 otherwise ⎩0 otherwise<br />
INV =β D +β D + +β<br />
D +β V +β K + e<br />
it 11 1i 12 2i 1,10 10i 2 2it 3 3it it<br />
(15.12)<br />
This specification is sometimes called the least squares dummy<br />
variable model, or the fixed effects model.<br />
Principles <strong>of</strong> Econometrics, 3rd Edition<br />
Slide 15-25
Principles <strong>of</strong> Econometrics, 3rd Edition<br />
Slide 15-26
H<br />
H<br />
: β =β = =β<br />
0 11 12 1N<br />
: the β are not all equal<br />
1 1i<br />
(15.13)<br />
These N–1= 9 joint null hypotheses are tested using the usual F-test<br />
statistic. In the restricted model all the intercept parameters are equal.<br />
If we call their common value β 1 , then the restricted model is:<br />
INV =β +β V +β K + e<br />
it 1 2 it 3 it it<br />
So this is just OLS, the pooled model<br />
Principles <strong>of</strong> Econometrics, 3rd Edition<br />
Slide 15-27
eg inv v k<br />
Principles <strong>of</strong> Econometrics, 3rd Edition<br />
Slide 15-28
F<br />
=<br />
( R<br />
−<br />
U)<br />
SSE ( NT − K )<br />
SSE SSE J<br />
U<br />
( − )<br />
522855 ( 200 −12)<br />
1749128 522855 9<br />
= =<br />
48.99<br />
We reject the null hypothesis that the intercept parameters for all<br />
firms are equal. We conclude that there are differences in firm<br />
intercepts, and that the data should not be pooled into a single model<br />
with a common intercept parameter.<br />
Principles <strong>of</strong> Econometrics, 3rd Edition<br />
Slide 15-29
yit =β<br />
1i +β<br />
2x2it +β<br />
3x3it + eit<br />
t = 1, ,<br />
T<br />
(15.14)<br />
1 T it 1i 2 2it 3 3it it<br />
t 1<br />
( y x x e )<br />
∑ =β +β +β +<br />
T =<br />
T T T T<br />
1 1 1 1<br />
y = y =β +β x +β x + e<br />
∑ ∑ ∑ ∑<br />
i it 1i 2 2it 3 3it it<br />
T t= 1 T t= 1 T t= 1 T t=<br />
1<br />
(15.15)<br />
=β +β x +β x + e<br />
1i 2 2i 3 3i i<br />
Principles <strong>of</strong> Econometrics, 3rd Edition<br />
Slide 15-30
y =β +β x +β x + e<br />
it 1i 2 2it 3 3it it<br />
− ( y =β +β x +β x + e)<br />
i 1i 2 2i 3 3i i<br />
(15.16)<br />
y − y =β ( x − x ) +β ( x − x ) + ( e −e)<br />
it i 2 2it 2i 3 3it 3i it i<br />
y =β x +β x + e<br />
it 2 it 3 it it<br />
(15.17)<br />
Principles <strong>of</strong> Econometrics, 3rd Edition<br />
Slide 15-31
Principles <strong>of</strong> Econometrics, 3rd Edition<br />
Slide 15-32
Usually, there is no interest in the intercepts….<br />
INV .1098 .3106<br />
it = V it + K<br />
(se*) (.0116) (.0169)<br />
it<br />
(15.18)<br />
2<br />
*<br />
( )<br />
σ ˆ<br />
e<br />
= SSE NT −2<br />
( NT ) ( NT N )<br />
−2 − − 2 = 198 188 = 1.02625<br />
Principles <strong>of</strong> Econometrics, 3rd Edition<br />
Slide 15-33
Some s<strong>of</strong>tware comes up with one sometimes though…<br />
Or if wanted you should be able to retrieve the individual ones<br />
Principles <strong>of</strong> Econometrics, 3rd Edition<br />
Slide 15-34
y = b + bx + bx<br />
i 1i 2 2i 3 3i<br />
b1 i<br />
= yi −bx 2 2i − bx<br />
3 3i<br />
i= 1, ,<br />
N<br />
(15.19)<br />
Principles <strong>of</strong> Econometrics, 3rd Edition<br />
Slide 15-35
ONE PROBLEM: Even with the trick <strong>of</strong> using the within estimator, we still<br />
implicitly (even if no longer explicitly) include N-1 dummy variables in our<br />
model (not N, since we remove the intercept), so we use up N-1 degrees <strong>of</strong><br />
freedom.<br />
It might not be then the most efficient way to estimate the common slope<br />
ANOTHER ONE. By using deviations from the means, the procedure wipes<br />
out all the static variables, whose effects might be <strong>of</strong> interest<br />
In order to overcome this problem, we can consider the random effects/or error<br />
components model<br />
Principles <strong>of</strong> Econometrics, 3rd Edition<br />
Slide 15-36
• In the RE model, the individual firm differences are thought<br />
to represent a random variation about some average<br />
intercept for the individual in the sample<br />
• Rather than a separate fixed effect for each firm, we now<br />
estimate an overall intercept that represents this average<br />
• Implicitly, the regression function for the sample firms vary<br />
randomly around this average.<br />
• The variability <strong>of</strong> the individual effects is captured by a new<br />
parameter, which is the variance <strong>of</strong> the random effect.<br />
• The larger this parameter is, the more variation you find in<br />
the implicit regression functions for the firms.<br />
Principles <strong>of</strong> Econometrics, 3rd Edition
β =β+u<br />
1i<br />
1<br />
i<br />
Average intercept<br />
(15.20)<br />
( ) ( )<br />
2<br />
= 0, cov , = 0, var ( ) = σ<br />
E u u u u<br />
i i j i u<br />
(15.21)<br />
y =β +β x +β x + e<br />
it 1i 2 2it 3 3it it<br />
Randomness <strong>of</strong> the intercept<br />
( )<br />
= β + u +β x +β x + e<br />
1 i 2 2it 3 3it it<br />
Usual error<br />
(15.22)<br />
Principles <strong>of</strong> Econometrics, 3rd Edition<br />
Slide 15-38
( )<br />
y =β +β x +β x + e + u<br />
it 1 2 2it 3 3it it i<br />
=β +β x +β x + v<br />
1 2 2it 3 3it it<br />
a composite error<br />
(15.23)<br />
vit = ui + eit<br />
(15.24)<br />
Because the random effects regression error has two components, one<br />
for the individual and one for the regression, the random effects<br />
model is <strong>of</strong>ten called an error components model.<br />
Principles <strong>of</strong> Econometrics, 3rd Edition<br />
Slide 15-39
( ) = ( + ) = ( ) + ( ) = 0+ 0=<br />
0<br />
E v E u e E u E e<br />
it i it i it<br />
( v ) var ( u e )<br />
σ = var = +<br />
2<br />
v it i it<br />
v has zero mean<br />
( u ) ( e ) ( u e )<br />
= var + var + 2cov ,<br />
=σ +σ<br />
2 2<br />
u e<br />
i it i it<br />
v has constant variance<br />
If there is no correlation between<br />
the individual effects and the<br />
error term<br />
(15.25)<br />
Principles <strong>of</strong> Econometrics, 3rd Edition<br />
Slide 15-40
But now there are several correlations that can be considered.<br />
• The correlation between two individuals, i and j, at the same<br />
point in time, t. The covariance for this case is given by<br />
( v v ) = Evv = E⎡( u+ e)( u + e )<br />
cov , ( )<br />
it jt it jt i it j jt<br />
⎣<br />
( ) ( ) ( ) ( )<br />
= E uu + E ue + E e u + E e e<br />
i j i jt it j it jt<br />
= 0+ 0+ 0+ 0=<br />
0<br />
⎤<br />
⎦<br />
Principles <strong>of</strong> Econometrics, 3rd Edition<br />
Slide 15-41
• The correlation between errors on the same individual (i) at<br />
different points in time, t and s. The covariance for this case is<br />
given by<br />
( v v ) E v v E ( u e )( u e )<br />
cov<br />
it<br />
,<br />
is<br />
= (<br />
it is)<br />
= ⎡ ⎣ i<br />
+<br />
it i<br />
+<br />
is<br />
⎤⎦<br />
(<br />
2<br />
) i ( i is ) ( it i ) ( it is )<br />
= E u + E ue + E e u + E e e<br />
(15.26)<br />
=σ + 0+ 0+ 0=σ<br />
2 2<br />
u<br />
u<br />
Principles <strong>of</strong> Econometrics, 3rd Edition<br />
Slide 15-42
• The correlation between errors for different individuals in<br />
different time periods. The covariance for this case is<br />
( v v ) = Evv = E⎡( u+ e)( u + e )<br />
cov , ( )<br />
it js it js i it j js<br />
⎣<br />
( ) ( ) ( ) ( )<br />
= E uu + E ue + E e u + E e e<br />
i j i js it j it js<br />
= 0+ 0+ 0+ 0=<br />
0<br />
⎤<br />
⎦<br />
Principles <strong>of</strong> Econometrics, 3rd Edition<br />
Slide 15-43
cov( v , v ) σ<br />
ρ= corr( vit<br />
, vis<br />
) = =<br />
var( v ) var( ) σ +σ<br />
it<br />
2<br />
it is u<br />
2 2<br />
vis<br />
u e<br />
(15.27)<br />
The errors are correlated over time for a given individual, but are otherwise<br />
uncorrelated<br />
This correlation does not dampen over time as in the AR1 model<br />
Principles <strong>of</strong> Econometrics, 3rd Edition<br />
Slide 15-44
y =β +β x +β x + e<br />
it 1 2 2it 3 3it it<br />
LM<br />
Principles <strong>of</strong> Econometrics, 3rd Edition<br />
e = y −b−bx −bx<br />
ˆit it 1 2 2 it 3 3 it<br />
2<br />
⎧ N T<br />
⎛<br />
ˆ<br />
⎞ ⎫<br />
∑∑eit<br />
NT ⎪<br />
⎜ ⎟<br />
i= 1 t=<br />
1 ⎪<br />
=<br />
⎝ ⎠<br />
⎨ −1<br />
N T ⎬<br />
2( T −1)<br />
⎪<br />
2<br />
∑∑eˆ<br />
it ⎪<br />
⎪ i= 1 t=<br />
1<br />
⎩<br />
⎪<br />
⎭<br />
(15.28)<br />
GRETL shows this Breusch and Pagan<br />
Lagrange multiplier test for random effects by<br />
default<br />
Slide 15-45
• GRETL shows by default this Breusch and Pagan<br />
Lagrangian multiplier test for RE with the null <strong>of</strong> no<br />
variation about a mean (effects are fixed) in the<br />
individual effects.<br />
• This is xttest0 in Stata…<br />
• If H0 is not rejected you can use pooled OLS if the<br />
effects are common and the FE if they differ by<br />
group<br />
Principles <strong>of</strong> Econometrics, 3rd Edition
GRETL shows by default this Breusch and Pagan Lagrangian multiplier test for RE<br />
with the null <strong>of</strong> no variation about a mean (effects are fixed) in the individual<br />
effects.<br />
Principles <strong>of</strong> Econometrics, 3rd Edition
• GRETL also shows the Hausman test <strong>of</strong> the null<br />
hypothesis that the random effects are indeed<br />
random.<br />
• If they are random, then they should not be correlated<br />
with any <strong>of</strong> your other regressors.<br />
• If they are correlated with other regressors, then you<br />
should use the FE estimator to obtain consistent<br />
parameter estimates <strong>of</strong> your slopes<br />
Principles <strong>of</strong> Econometrics, 3rd Edition
y =β x +β x +β x + v<br />
* * * * *<br />
it 1 1it 2 2it 3 3it it<br />
(15.29)<br />
y = y −α y , x = 1 −α , x = x −α x , x = x −αx<br />
* * * *<br />
it it i 1it 2it 2it 2i 3it 3it 3i<br />
(15.30)<br />
α= −<br />
σ<br />
e<br />
1<br />
2 2<br />
Tσ u<br />
+σe<br />
(15.31)<br />
Is the transformation parameter<br />
Principles <strong>of</strong> Econometrics, 3rd Edition<br />
Slide 15-49
σˆ e<br />
.1951<br />
α= ˆ 1− = 1 − = .7437<br />
Tσ ˆ +σˆ<br />
5 .1083 + .0381<br />
2 2<br />
u e<br />
Is the transformation parameter<br />
( )<br />
Principles <strong>of</strong> Econometrics, 3rd Edition<br />
Slide 15-50
• There are different ways to calculate FE (some<br />
packages will calculate an intercept, some<br />
won’t)<br />
• There are different ways to calculate sigma-sq<br />
(STATA in textbook and GRETL will give you<br />
slightly different results!)<br />
Principles <strong>of</strong> Econometrics, 3rd Edition
• Pooled OLS vs different intercepts: test (use a Chow<br />
type, after FE or run RE and test if the variance <strong>of</strong><br />
the intercept component <strong>of</strong> the error is zero (Breusch-<br />
Pagan test (xttest0 in STATA))<br />
• You cannot pool onto OLS? Then…<br />
• Choose between FE vs RE: (Hausman test)<br />
• GRETL summary tests: panel Inv const V K --pooled<br />
• Different slopes too perhaps? => use SURE or RCM<br />
and test for equality <strong>of</strong> slopes across units
• Note that there is within variation versus<br />
between variation<br />
• The OLS is an unweighted average <strong>of</strong> the<br />
between estimator and the within estimator<br />
• The RE is a weighted average <strong>of</strong> the between<br />
estimator and the within estimator<br />
• The FE is also a weighted average <strong>of</strong> the<br />
between estimator and the within estimator<br />
with zero as the weight for the between part
• The RE is a weighted average <strong>of</strong> the between<br />
estimator and the within estimator<br />
• The FE is also a weighted average <strong>of</strong> the<br />
between estimator and the within estimator<br />
with zero as the weight for the between part<br />
• So now you see where the extra efficiency <strong>of</strong><br />
RE comes from!...
• The RE uses information from both the crosssectional<br />
variation in the panel and the time<br />
series variation, so it mixes LR and SR effects<br />
• The FE uses only information from the time<br />
series variation, so it estimates SR* effects
• With a panel, we can learn about dynamic<br />
effects from a short panel, while we need a<br />
long time series on a single cross-sectional<br />
unit, to learn about dynamics from a time<br />
series data set
If the random error<br />
v = u + e<br />
it i it<br />
is correlated with any <strong>of</strong> the right-hand side<br />
explanatory variables in a random effects model then the least squares and<br />
GLS estimators <strong>of</strong> the parameters are biased and inconsistent.<br />
This bias creeps in through the between variation, <strong>of</strong> course, so the FE model<br />
will avoid it<br />
Principles <strong>of</strong> Econometrics, 3rd Edition<br />
Slide 15-57
yit =β<br />
1+β 2x2it +β<br />
3x3 it<br />
+ ( ui + eit<br />
)<br />
(15.32)<br />
T T T T T<br />
1 1 1 1 1<br />
y = y =β +β x +β x + u + e<br />
∑ ∑ ∑ ∑ ∑<br />
i it 1 2 2it 3 3it i it<br />
T t= 1 T t= 1 T t= 1 T t= 1 T t=<br />
1<br />
(15.33)<br />
=β +β x +β x + u + e<br />
1 2 2i 3 3i i i<br />
Principles <strong>of</strong> Econometrics, 3rd Edition<br />
Slide 15-58
y =β +β x +β x + u + e<br />
it 1 2 2it 3 3it i it<br />
− ( y =β +β x +β x + u + e)<br />
i 1 2 2i 3 3i i i<br />
(15.34)<br />
y − y =β ( x − x ) +β ( x − x ) + ( e −e)<br />
it i 2 2it 2i 3 3it 3i it i<br />
Principles <strong>of</strong> Econometrics, 3rd Edition<br />
Slide 15-59
t<br />
bFE, k<br />
−bRE, k<br />
bFE, k<br />
−bRE,<br />
k<br />
= =<br />
<br />
2 2<br />
⎡var<br />
( b<br />
, ) var ( , ) se( FE, k ) se<br />
FE k<br />
− b ⎤ ⎡ b −<br />
RE k<br />
( bRE,<br />
k )<br />
⎤<br />
⎢⎣<br />
⎥⎦<br />
⎢⎣ ⎥⎦<br />
12 12<br />
(15.35)<br />
We expect to find<br />
<br />
var − var b > 0.<br />
( b )<br />
( )<br />
FE, k<br />
RE,<br />
k<br />
( b − b ) = ( b ) + ( b ) − ( b b )<br />
var var var 2cov ,<br />
FE, k RE, k FE, k RE, k FE, k RE,<br />
k<br />
( b ) var ( b )<br />
= var −<br />
FE, k<br />
RE,<br />
k<br />
because Hausman proved that<br />
( b b ) = ( b )<br />
cov , var .<br />
FE, k RE, k RE,<br />
k<br />
Principles <strong>of</strong> Econometrics, 3rd Edition<br />
Slide 15-60
The test statistic to the coefficient <strong>of</strong> SOUTH is:<br />
t<br />
b<br />
− b<br />
−.0163 −(.0818)<br />
FE, k RE,<br />
k<br />
= = =<br />
2 2<br />
12<br />
2 2<br />
12<br />
⎡se<br />
⎤ ⎡ ⎤<br />
⎢ FE, k<br />
RE,<br />
k<br />
⎣<br />
⎥⎦<br />
⎣<br />
⎦<br />
( b ) − se( b ) (.0361) − (.0224)<br />
2.3137<br />
Using the standard 5% large sample critical value <strong>of</strong> 1.96, we reject<br />
the hypothesis that the estimators yield identical results. Our<br />
conclusion is that the random effects estimator is inconsistent, and we<br />
should use the fixed effects estimator, or we should attempt to<br />
improve the model specification.<br />
Principles <strong>of</strong> Econometrics, 3rd Edition<br />
Slide 15-61
If the random error<br />
v = u + e<br />
it i it<br />
is correlated with any <strong>of</strong> the righthand<br />
side explanatory variables in a random effects model then the<br />
least squares and GLS estimators <strong>of</strong> the parameters are biased and<br />
inconsistent.<br />
Then we would have to use the FE model<br />
But with FE we lose the static variables?<br />
Solutions? HT, AM, BMS, instrumental variables models could help<br />
Principles <strong>of</strong> Econometrics, 3rd Edition<br />
Slide 15-62
Further issues<br />
We can generalise the random effects idea and allow for different<br />
slopes too: Random Coefficients Model<br />
Again, the now it is the slope parameters that differ, but as in RE<br />
model, they are drawn from a common distribution<br />
The RCM in a way is to the RE model what the SURE model is to the<br />
FE model<br />
Principles <strong>of</strong> Econometrics, 3rd Edition<br />
Slide 15-63
Further issues<br />
Unit root tests and Cointegration in panels<br />
Dynamics in panels<br />
Principles <strong>of</strong> Econometrics, 3rd Edition<br />
Slide 15-64
Further issues<br />
• Of course it is not necessary that one <strong>of</strong> the dimensions <strong>of</strong> the panel is time<br />
as such Example: i are students and t is for each quiz they take<br />
• Of course we could have a one-way effect model on the time dimension<br />
instead<br />
• Or a two-way model<br />
• Or a three way model! But things get a bit more complicated there…<br />
Principles <strong>of</strong> Econometrics, 3rd Edition<br />
Slide 15-65
Further issues<br />
• Another way to have more fun with panel data is to consider<br />
dependent variables that are not continuous<br />
• Logit, probit, count data can be considered<br />
• STATA has commands for these<br />
• Based on maximum likelihood and other estimation techniques we<br />
have not yet considered<br />
Principles <strong>of</strong> Econometrics, 3rd Edition<br />
Slide 15-66
Further issues<br />
• You can understand the use <strong>of</strong> the FE model as a solution to omitted<br />
variable bias<br />
• If the unmeasured variables left in the error model are not correlated<br />
with the ones in the model, we would not have a bias in OLS, so we<br />
can safely use RE<br />
• If the unmeasured variables left in the error model are correlated with<br />
the ones in the model, we would have a bias in OLS, so we cannot<br />
use RE, we should not leave them out and we should use FE, which<br />
bundles them together in each cross-sectional dummy<br />
Principles <strong>of</strong> Econometrics, 3rd Edition<br />
Slide 15-67
Further issues<br />
• Another criterion to choose between FE and RE<br />
• If the panel include all the relevant cross-sectional units, use FE, if<br />
only a random sample from a population, RE is more appropriate (as<br />
long as it is valid)<br />
•<br />
Principles <strong>of</strong> Econometrics, 3rd Edition<br />
Slide 15-68
Readings<br />
Wooldridge’s book on panel data<br />
Baltagi’s book on panel data<br />
Greene’s coverage is also good<br />
Principles <strong>of</strong> Econometrics, 3rd Edition<br />
Slide 15-69
• Balanced panel<br />
• Breusch-Pagan test<br />
• Cluster corrected standard errors<br />
• Contemporaneous correlation<br />
• Endogeneity<br />
• Error components model<br />
• Fixed effects estimator<br />
• Fixed effects model<br />
• Hausman test<br />
• Heterogeneity<br />
• Least squares dummy variable<br />
model<br />
• LM test<br />
• <strong>Panel</strong> corrected standard errors<br />
• Pooled panel data regression<br />
Principles <strong>of</strong> Econometrics, 3rd Edition<br />
• Pooled regression<br />
• Random effects estimator<br />
• Random effects model<br />
• Seemingly unrelated regressions<br />
• Unbalanced panel<br />
Slide 15-70
Principles <strong>of</strong> Econometrics, 3rd Edition<br />
Slide 15-71
yit =β<br />
1+β 2x2it +β<br />
3x3 it<br />
+ ( ui + eit<br />
)<br />
(15A.1)<br />
y − y =β ( x − x ) +β ( x − x ) + ( e −e)<br />
it i 2 2it 2i 3 3it 3i it i<br />
(15A.2)<br />
σ ˆ =<br />
2<br />
e<br />
SSEDV<br />
NT −N −K<br />
slopes<br />
(15A.3)<br />
Principles <strong>of</strong> Econometrics, 3rd Edition Slide 15-72
yi =β<br />
1+β 2x2i +β<br />
3x3i + ui + ei<br />
i= 1, ,<br />
N<br />
(15A.4)<br />
⎛ ⎞<br />
var ( u + e ) = var ( u ) + var ( e ) = var ( u ) + var ⎜ e T⎟<br />
⎠<br />
T<br />
2<br />
2 1 ⎛ ⎞ 2 Tσ<br />
2 var<br />
e<br />
=σ<br />
u<br />
+ ⎜∑eit<br />
⎟=σ u<br />
+<br />
2<br />
T t=<br />
1 T<br />
i i<br />
T<br />
i i i ∑<br />
⎝ t=<br />
1<br />
it<br />
2 σ<br />
=σ<br />
u<br />
+<br />
T<br />
2<br />
e<br />
⎝<br />
⎠<br />
(15A.5)<br />
Principles <strong>of</strong> Econometrics, 3rd Edition Slide 15-73
2<br />
2 σe SSEBE<br />
u<br />
T N − KBE<br />
σ + =<br />
(15A.6)<br />
2 2<br />
2 2 σ ˆ<br />
e<br />
σe SSEBE SSEDV<br />
σ ˆ<br />
u<br />
=σ<br />
u<br />
+ − = −<br />
T T N − K T NT −N −K<br />
BE<br />
( )<br />
slopes<br />
(15A.7)<br />
Principles <strong>of</strong> Econometrics, 3rd Edition Slide 15-74