Chapter 2 Slides Handout
Chapter 2 Slides Handout
1/48
Introduction
Prep: Statistical Concepts
The Fixed Effects Model
The Random Effects Model
Fixed Effects or Random Effects?
References
Introduction
2/48
Introduction
Prep: Statistical Concepts
The Fixed Effects Model
The Random Effects Model
Fixed Effects or Random Effects?
References
Introduction
3/48
Introduction
Prep: Statistical Concepts
The Fixed Effects Model
The Random Effects Model
Fixed Effects or Random Effects?
References
Introduction
4/48
Introduction
Prep: Statistical Concepts
The Fixed Effects Model
The Random Effects Model
Fixed Effects or Random Effects?
References
Introduction
Basic econometric setup of panel data (Pooled OLS)
Introduction
Implement the regression
yi=1,t=1 xi=1,t=1 ui=1,t=1
yi=1,t=2 xi=1,t=2 ui=1,t=2
.. .. ..
.
.
.
yi=1,t=T xi=1,t=T ui=1,t=T
..
= α + β
.. +
..
.
.
.
yi=N,t=1 xi=N,t=1 ui=N,t=1
yi=N,t=2 xi=N,t=2 ui=N,t=2
.. .. ..
. . .
yi=N,t=T xi=N,t=T ui=N,t=T
6/48
Introduction
Prep: Statistical Concepts
The Fixed Effects Model
The Random Effects Model
Fixed Effects or Random Effects?
References
7/48
Introduction
Prep: Statistical Concepts
The Fixed Effects Model
The Random Effects Model
Fixed Effects or Random Effects?
References
8/48
Introduction
Prep: Statistical Concepts
The Fixed Effects Model
The Random Effects Model
Fixed Effects or Random Effects?
References
9/48
Introduction
Prep: Statistical Concepts
The Fixed Effects Model
The Random Effects Model
Fixed Effects or Random Effects?
References
10/48
Introduction
Prep: Statistical Concepts
The Fixed Effects Model
The Random Effects Model
Fixed Effects or Random Effects?
References
11/48
Introduction
Prep: Statistical Concepts
The Fixed Effects Model
The Random Effects Model
Fixed Effects or Random Effects?
References
12/48
Introduction
Prep: Statistical Concepts
The Fixed Effects Model
The Random Effects Model
Fixed Effects or Random Effects?
References
13/48
Introduction
Prep: Statistical Concepts
The Fixed Effects Model
The Random Effects Model
Fixed Effects or Random Effects?
References
E{b} = β. (2)
14/48
Introduction
Prep: Statistical Concepts
The Fixed Effects Model
The Random Effects Model
Fixed Effects or Random Effects?
References
15/48
Introduction
Prep: Statistical Concepts
The Fixed Effects Model
The Random Effects Model
Fixed Effects or Random Effects?
References
16/48
Introduction
Prep: Statistical Concepts The Least Squares Dummy Variable Estimator
The Fixed Effects Model Within Transformation
The Random Effects Model Time-Fixed Effects Model
Fixed Effects or Random Effects? Two-Way Fixed Effects Model
References
18/48
Introduction
Prep: Statistical Concepts The Least Squares Dummy Variable Estimator
The Fixed Effects Model Within Transformation
The Random Effects Model Time-Fixed Effects Model
Fixed Effects or Random Effects? Two-Way Fixed Effects Model
References
20/48
Introduction
Prep: Statistical Concepts The Least Squares Dummy Variable Estimator
The Fixed Effects Model Within Transformation
The Random Effects Model Time-Fixed Effects Model
Fixed Effects or Random Effects? Two-Way Fixed Effects Model
References
21/48
Introduction
Prep: Statistical Concepts The Least Squares Dummy Variable Estimator
The Fixed Effects Model Within Transformation
The Random Effects Model Time-Fixed Effects Model
Fixed Effects or Random Effects? Two-Way Fixed Effects Model
References
22/48
Introduction
Prep: Statistical Concepts The Least Squares Dummy Variable Estimator
The Fixed Effects Model Within Transformation
The Random Effects Model Time-Fixed Effects Model
Fixed Effects or Random Effects? Two-Way Fixed Effects Model
References
24/48
Introduction
Prep: Statistical Concepts The Least Squares Dummy Variable Estimator
The Fixed Effects Model Within Transformation
The Random Effects Model Time-Fixed Effects Model
Fixed Effects or Random Effects? Two-Way Fixed Effects Model
References
25/48
Introduction
Prep: Statistical Concepts The Least Squares Dummy Variable Estimator
The Fixed Effects Model Within Transformation
The Random Effects Model Time-Fixed Effects Model
Fixed Effects or Random Effects? Two-Way Fixed Effects Model
References
27/48
Introduction
Prep: Statistical Concepts The Least Squares Dummy Variable Estimator
The Fixed Effects Model Within Transformation
The Random Effects Model Time-Fixed Effects Model
Fixed Effects or Random Effects? Two-Way Fixed Effects Model
References
λt captures all of the variables that vary over time but are
constant cross-sectionally.
I business cycle
I regulatory environment
I tax rate
their effect may be the same for everyone in the economy but
vary over time.
28/48
Introduction
Prep: Statistical Concepts The Least Squares Dummy Variable Estimator
The Fixed Effects Model Within Transformation
The Random Effects Model Time-Fixed Effects Model
Fixed Effects or Random Effects? Two-Way Fixed Effects Model
References
29/48
Introduction
Prep: Statistical Concepts The Least Squares Dummy Variable Estimator
The Fixed Effects Model Within Transformation
The Random Effects Model Time-Fixed Effects Model
Fixed Effects or Random Effects? Two-Way Fixed Effects Model
References
30/48
Introduction
Prep: Statistical Concepts The Least Squares Dummy Variable Estimator
The Fixed Effects Model Within Transformation
The Random Effects Model Time-Fixed Effects Model
Fixed Effects or Random Effects? Two-Way Fixed Effects Model
References
(RRSS − URSS)/(T − 1)
F0 = ∼ FT −1,NT −T −k (17)
URSS/(NT − T − k )
31/48
Introduction
Prep: Statistical Concepts The Least Squares Dummy Variable Estimator
The Fixed Effects Model Within Transformation
The Random Effects Model Time-Fixed Effects Model
Fixed Effects or Random Effects? Two-Way Fixed Effects Model
References
yit = βxit + µ1 D1 + µ2 D2 + µ3 D3 + · · · + µN DN
+ λ1 T1 + λ2 T2 + λ3 T3 + ... · · · + λT TT + vit . (19)
32/48
Introduction
Prep: Statistical Concepts The Least Squares Dummy Variable Estimator
The Fixed Effects Model Within Transformation
The Random Effects Model Time-Fixed Effects Model
Fixed Effects or Random Effects? Two-Way Fixed Effects Model
References
written as
34/48
Introduction
Prep: Statistical Concepts The Least Squares Dummy Variable Estimator
The Fixed Effects Model Within Transformation
The Random Effects Model Time-Fixed Effects Model
Fixed Effects or Random Effects? Two-Way Fixed Effects Model
References
35/48
Introduction
Prep: Statistical Concepts The Least Squares Dummy Variable Estimator
The Fixed Effects Model Within Transformation
The Random Effects Model Time-Fixed Effects Model
Fixed Effects or Random Effects? Two-Way Fixed Effects Model
References
Implementation in Stata
Consider an application of panel data on a test of capital asset
pricing model due to Fama and MacBeth (1973). The test
involves a two-step estimation procedure:
1. First, the market beta is estimated in separate time series
regression for each firm.
2. Second, for each time point t, a cross-sectional regression
of the excess returns on the estimated betas is conducted
Rit − Rft = λ0 + λm βit + uit (22)
where the dependent variable is the excess return of i at
each t and the independent variable is the estimated beta
for i.
If CAPM holds, λ0 =0 and λm should approximate the (time
average) equity market risk premium, Rm − Rf .
36/48
Introduction
Prep: Statistical Concepts The Least Squares Dummy Variable Estimator
The Fixed Effects Model Within Transformation
The Random Effects Model Time-Fixed Effects Model
Fixed Effects or Random Effects? Two-Way Fixed Effects Model
References
Implementation in Eviews
Fama and MacBeth (1973) proposed estimating this second
stage regression separately for each time period, and then
taking the average of the parameter estimates to conduct
hypothesis tests. Regression (22) is a combination setting of
cross-section and time-series, therefore, we can achieve a
similar objective using a panel approach. We will use a sample
comprising the annual returns and estimated betas for eleven
years on 2500 UK firms provided by Brooks (2019):
https://www.cambridge.org/as/academic/
subjects/economics/finance/
introductory-econometrics-finance-4th-edition?
format=PB → ’Resources’ → ’General Resources’ → ’Excel
files’ → ’panelex.xls’.
37/48
Introduction
Prep: Statistical Concepts
The Fixed Effects Model
The Random Effects Model
Fixed Effects or Random Effects?
References
38/48
Introduction
Prep: Statistical Concepts
The Fixed Effects Model
The Random Effects Model
Fixed Effects or Random Effects?
References
39/48
Introduction
Prep: Statistical Concepts
The Fixed Effects Model
The Random Effects Model
Fixed Effects or Random Effects?
References
where the error term εit is iid over individuals and time.
I Estimate σµ2 and σv2 in the first step.
I In the second step, estimate the transformed model using
OLS. The estimators are named as the random-effects
estimators.
Similarly to the time-fixed effects model and the two-way fixed
effects model, we can estimate a time-random effects model
and a two-way random effects model including random effects
for time periods.
41/48
Introduction
Prep: Statistical Concepts
The Fixed Effects Model
The Random Effects Model
Fixed Effects or Random Effects?
References
One may prefer the fixed effects estimator if some interest lies
in µi , which makes sense if the number of units is relatively
small and of a specific nature. The random effects are more
appropriate when the entities in the sample can be thought of
as having been randomly selected from the population.
42/48
Introduction
Prep: Statistical Concepts
The Fixed Effects Model
The Random Effects Model
Fixed Effects or Random Effects?
References
43/48
Introduction
Prep: Statistical Concepts
The Fixed Effects Model
The Random Effects Model
Fixed Effects or Random Effects?
References
44/48
Introduction
Prep: Statistical Concepts
The Fixed Effects Model
The Random Effects Model
Fixed Effects or Random Effects?
References
45/48
Introduction
Prep: Statistical Concepts
The Fixed Effects Model
The Random Effects Model
Fixed Effects or Random Effects?
References
46/48
Introduction
Prep: Statistical Concepts
The Fixed Effects Model
The Random Effects Model
Fixed Effects or Random Effects?
References
47/48
Introduction
Prep: Statistical Concepts
The Fixed Effects Model
The Random Effects Model
Fixed Effects or Random Effects?
References
References
48/48