Panel Data For Learing
Panel Data For Learing
panel of size N T .
Note that:
You find the data in the file penn.wmf, already in Eviews format.
We are in particular interested in the effect of Openness on economic
growth.
6. Pooling the data ignores the fact that the data originate from different
countries. Dummy variables for the different countries need to be added. This
can be done by specifying the constant term as a cross section specific
coefficient. We obtain a fixed effect panel data model. Discuss the
regression output.
7. The fixed effect panel data model assumes that the effect of openness is the
same of all countries. How could you relax this assumption?
8. Test whether all country effects are equal (to know how Eviews labels the
coefficients, use View/Representation), using a Wald test. The country
effects are called the fixed effects, and if there are significantly different then
there is unobserved heterogeneity.
Yi = Xi + i (i = 1, . . . , n)
with
OLS =
n
X
Xi Xi
i=1
!1
n
X
i=1
Xi Yi
Cross-sectional heteroscedasticity
...
Yi = Xi + i (i = 1, . . . , n)
with
One can still use OLS (not even a bad idea), if one uses
10
GLS =
n X
n
X
i=1 j=1
wij Xi Xj
n X
n
X
i=1 j=1
wij Xi Yj ,
wij = (1 )ij .
11
riOLS = Yi Xi OLS .
2. Use the above residuals to estimate the ij . [This will require
some additional assumptions on the structure of ]
Compute then the GLS estimator with estimated weights wij .
The above scheme can be iterated fully iterated GLS estimator.
12
Theoretical Example
Our sample of size n = 20 consists of two groups of equal size (e.g.
men and women). There is no correlation among the observations,
but we think that the variances of the error terms for men and
women might be of different size.
[The error terms contains the omitted and unobserved variables. We
might indeed think that their size is different for women than for
men, e.g. when regressing salary on individual characteristics]
2
i2 = ii = M
for i = 1, . . . , 10
i2 = ii = F2
for i = 11, . . . , 20
ij = 0 for i 6= j .
13
10
20
X
1 X OLS 2
1
=
(ri
) and
F2 =
(riOLS )2 .
10 i=1
10 i=11
1
w
i = 2
1
(i = 1, . . . , 10) and w
i = 2
GLS =
n
X
wi Xi Xi
i=1
14
!1
n
X
i=1
(i = 11, . . . , 20)
wi Xi Yi
15
16
Yit = Xit
+ i + it
17
H0 : 1 = . . . = N :=
(Test for redundant fixed effects)
In case H0 holds, there is no unobserved heterogeneity, and the model
reduces to the pooled regression model:
+ + it
Yit = Xit
18
15
Cross Section 1
Cross Section 2
10
Pooled Regression
Cross Section 3
19
LSDV estimation
LSDV=Least Squares Dummy Variable estimation
Rewrite the model as
20
Y
it
Yi.
=
=
Xit
+ i + it
+ i + i.
X
i.
i. ) + (it i. )
(Yit Yi. ) = (Xit X
Regress the centered Yit on the centered Xit by OLS.
By centering, the fixed effects are eliminated !
One can show that the within group estimator is identical to LSDV.
21
Comments
1. If a variable Xit is constant in time for all cross-sections, the FE
model cannot be estimated.
Why?
2. The fixed effects model can be rewritten with a common
intercept included as
Yit = Xit
+ + i + it ,
and
1 + 2 + . . . + N = 0.
Obviously, we have i = + i , and is the average of the fixed
effects.
22
3. One can add time effects (or period effects) in the model:
+ i + t + it ,
Yit = Xit
23
24
25
1. Have a look at the data in the Excel File. Write up the number of
observations, the number of variables, and the upper left cell of the data
matrix. Close the Excel file, create an unstructured Workfile and read in the
data (Proc/Import/Read Text Lotus Excel).
2. To apply a panel structure, double click on the Range: line at the top of
the workfile window, or select Proc/Structure/Resize Current Page. Select
Dated Panel, and enter the appropriate variables as Date Series and as
Cross Section ID series.
3. Open the investment series. Explore the Descriptive Statistics and tests
menu.
26
4. Use View/Graph to (i) Make a line plot of the time series for every cross
section (ii) Make boxplots of the distribution of investment over the different
cross sections and over time.
5. Use Quick/Estimate Equation to estimate the fixed effects model. Specify
the equation inv c cap value and use Panel Options to indicate that you use
fixed effects.
6. Interpret your outcome. Would it be useful to add period effects? Test
whether they this is necessary with View/Fixed Random Effects testing.
7. Select an appropriate weighting scheme within Panel Options. Interpret your
outcome.
27
Model
Yit = c + Xit
+ it
it = i + vit .
28
29
30
31
[robust to all forms of heteroscedasticity, but not robust for any type of
correlation over time of across cross-section.]
34