6/6/2022
Chapter 3 Fix Effect Model (FEM)
37
Mr U_KHOA TOÁN KINH TẾ
Objectives
38
(1) Introduce about Fix Effect Model
(2) Estimates the slope paramaters in FEM by Within Estimator, Between
Estimator
(3) Estimates FEM by Least Square Dummy Variables (LSDV) method
6/6/2022
Mr U_KHOA TOÁN KINH TẾ
3.1 Introduce about FEM
39
Notations
;b =
yi =
;Xi =
yi1 yi2 ... yiT
b1 b2 ... bK
... x Ki1 ... x Ki2 ... ... ... x KiT
x 2i1 x 2i2 ... x 2iT
Let us denote ö ÷ ÷ ÷ ÷ ÷ ø
æ ç ç ç ç ç è
æ ç ç ç ç ç è
ö ÷ ÷ ÷ ÷ ÷ ø
ö ÷ ÷ ÷ ÷ ÷ ø
æ ç ç ç ç ç è
T´1
K´1
T´K
x1,i,1 x1i2 ... x1iT Let us denote e a unit vector and εi the vector of errors
e =
;ei =
1 1 ... 1
æ ç ç ç ç è
ö ÷ ÷ ÷ ÷ ø
6/6/2022
Mr U_KHOA TOÁN KINH TẾ
T´1
ei1 ei2 ... eiT
æ ç ç ç ç ç è
ö ÷ ÷ ÷ ÷ ÷ ø
T´1
We consider the fix effect model:
40
yi = α0 + eαi + Xiβ+ εi. (i = 1, .., n) (3.1)
where
αi is assumed to be a constant term or have correlation with the explanatory
variables
Assumption 3.1 The error term εit are i.i.d ( it) with:
•
•
E (εit) = 0 E (εitεis) = σ2
ε when t =s and = 0 if t ≠ s or E (εiε’
i) = σ2
εIT here IT denotes
the identity matrix (T,T)
•
i ≠ j,
E (εitεjs) = 0 ,
(ts), or E (εiε’
j)= 0T here 0T denotes the identity
matrix (T,T)
Theorem 3.1 Under assumption (3.1), OLS estimator of parameters (β) is
6/6/2022
Mr U_KHOA TOÁN KINH TẾ
the best linear unbiased estimator (BLUE)
3.2 Estimates the slope paramaters
41
Case 1. Single regression
Method 1. Within Estimator
(3.1)
yi = eαi + Xiβ+ εi. (i = 1, .., n)
(3.1)
yit = αi + xit β+ εit ( it)
Taking mean of this equation (3.1) over time for each cross section unit i,
we have
(3.2)
(3.3)
yi = ai + x ib + ei Again by taking average Eq. (3.2) across individuals, we have y.. = a i + x..b + e..
Subtracting Eq. (3.2) from Eq. (3.1) for each t to get
(3.4)
yit - yi
(
( ) = b x it - x i
( ) + eit - ei
)
6/6/2022
Mr U_KHOA TOÁN KINH TẾ
Remark. (3.4) can be estimated by applying OLS, also calling the name
42
“Within Estimator”
Method 2. Between estimator (BE)
y
(3.6)
x
x
e-
b
-
-
=
y ..
..
..
i
i
i
( + e
)
(
Subtracting (3.2) from (3.3) for each t to get ) ) ( Between estimation (3.6) by OLS
Example 3.1 Using file “Data_Ch1.xlsx” to run the following model
_
it = 0 + 2
it + 𝑖𝑡
6/6/2022
Mr U_KHOA TOÁN KINH TẾ
45
Remark. OLS estimates by Pooled OLS can be looked as the
Case 2. Multiple regression
Method 1. Within estimation
(3.8)
yit = αi + xit β + εit
here
-
β’= (β1, β2, …, βk) ;
-
x’it = (x1it, x2it, …, xkit);
-
αi is a scalar intercepts representing the unobserved effects which are
6/6/2022
Mr U_KHOA TOÁN KINH TẾ
same over time;
weight sum of within estimates and between estimates
- The error term, εit , represents the effects of omitted variables 46 that will change across the individual units and time periods.
Assumption. εit is not uncorrelate with xit and εit ~ N(0, σ2 ε)
=
+
+
yi1 yi2 ... yiT
a i a i ... a i
x1i1 x1i2 ... x1iT
x 2i1 x 2i2 ... x 2iT
... x ki1 ... x ki2 ... ... ... x kiT
b1 b2 ... bk
ei1 ei2 ... eiT
æ ç ç ç ç ç è
ö ÷ ÷ ÷ ÷ ÷ ø
æ ç ç ç ç ç è
ö ÷ ÷ ÷ ÷ ÷ ø
æ ç ç ç ç ç è
ö ÷ ÷ ÷ ÷ ÷ ø
æ ç ç ç ç ç è
ö ÷ ÷ ÷ ÷ ÷ ø
æ ç ç ç ç ç è
ö ÷ ÷ ÷ ÷ ÷ ø
(3.9)
Or, yi = ea i + Xib + ei e is a vector of oder T, e’ = (1, 1, …,1)
6/6/2022
Mr U_KHOA TOÁN KINH TẾ
In vector form, (3.8) can expressed for unit i as
ee'
Q = IT -
47
1 T
Set
Pre multiplying Eq. (3.9) by Q, we have
Qyi = Qeαi + QXiβ+ Qεi
...
1-
-
-
yi1 - yi.
...
-
1-
-
ee'
=
1 T 1 T
1 T
æ Qyi = IT - èç
ö ø÷ yi =
...
yi1 yi2 ... yiT
æ ç ç ç ç ç è
ö ÷ ÷ ÷ ÷ ÷ ø
yi2 - yi. ... yiT - yi.
æ ç ç ç ç ç è
ö ÷ ÷ ÷ ÷ ÷ ø
-
-
... 1-
1 T 1 T ... 1 T
... 1 T
1 T 1 T ... 1 T
æ ç ç ç ç ç ç ç ç è
ö ÷ ÷ ÷ ÷ ÷ ÷ ÷ ÷ ø
Now,
Eq. (3.9) can show that Qe =0 → Qyi = QXiβ+ Qεi (3.10)
6/6/2022
Mr U_KHOA TOÁN KINH TẾ
We can apply OLS to find β parameter of Eq. (3.10)
48
For all cross section units N and over time T, Eq. (3.10) can be
expressed in the following matrix form:
Y =
,D =
,X =
,e =
e 0 ... 0
0 ... 0 ... 0 e ... ... ... e 0 ...
æ ç ç ç ç è
ö ÷ ÷ ÷ ÷ ø
y1 y2 ... yN
X1 X2 ... X N
e1 e2 ... eN
QY = QDα + QXβ+ Qε = QXβ+ Qε (3.12)
ö ÷ ÷ ÷ ÷ ÷ ø
æ ç ç ç ç ç è
ö ÷ ÷ ÷ ÷ ÷ ø
æ ç ç ç ç ç è
ö ÷ ÷ ÷ ÷ ÷ ø
Here, æ ç ç ç ç ç è
6/6/2022
Mr U_KHOA TOÁN KINH TẾ
The OLS obtained from Eq. (3.12) is
49
Substituting (3.13) into (3.12)
6/6/2022
Mr U_KHOA TOÁN KINH TẾ
Therefore,
50
Pre Example 3.1 With model
ROAA = f(HHI, L_A, SIZE, ASSET_GRO, GDP, INF) + ε
Requirement:
- The within estimates by OLS
- The between estimates by OLS
Remark. The within estiamates can also obtained by panel
regression by using xtreg command in Stata with option fixed
6/6/2022
Mr U_KHOA TOÁN KINH TẾ
efects denoting by fe
51
yit = αi + xit β+ εit
=
+
+
yi1 yi2 ... yiT
a i a i ... a i
x1i1 x1i2 ... x1iT
x 2i1 x 2i2 ... x 2iT
... x ki1 ... x ki2 ... ... ... x kiT
b1 b2 ... bk
ei1 ei2 ... eiT
æ ç ç ç ç ç è
ö ÷ ÷ ÷ ÷ ÷ ø
æ ç ç ç ç ç è
ö ÷ ÷ ÷ ÷ ÷ ø
æ ç ç ç ç ç è
ö ÷ ÷ ÷ ÷ ÷ ø
æ ç ç ç ç ç è
ö ÷ ÷ ÷ ÷ ÷ ø
æ ç ç ç ç ç è
ö ÷ ÷ ÷ ÷ ÷ ø
(3.9)
Or, yi = ea i + Xib + ei
In vector form, for all cross section units , Eq. (3.9) can be
expressed as
6/6/2022
Mr U_KHOA TOÁN KINH TẾ
3.3 Least Squares Dummy Variable (LSDV) Regression
=
+
a1 +
a 2 + ...+
a N +
0 0 ... e
e 0 ... 0
0 e ... 0
æ ç ç ç ç è
ö ÷ ÷ ÷ ÷ ø
æ ç ç ç ç è
ö ÷ ÷ ÷ ÷ ø
æ ç ç ç ç è
ö ÷ ÷ ÷ ÷ ø
y1 y2 ... yN
X1 X2 ... X N
e1 52 e2 ... e N
b1 b2 ... bk
ö ÷ ÷ ÷ ÷ ÷ ø
æ ç ç ç ç ç è
æ ç ç ç ç ç è
ö ÷ ÷ ÷ ÷ ÷ ø
æ ç ç ç ç ç è
ö ÷ ÷ ÷ ÷ ÷ ø
æ ç ç ç ç ç è
ö ÷ ÷ ÷ ÷ ÷ ø
Here,
;e =
;e =
yi =
;Xi =
1 1 ... 1
æ ç ç ç ç è
ö ÷ ÷ ÷ ÷ ø
T´1
yi1 yi2 ... yiT
x1i1 x1i2 ... x1iT
x 2i1 x 2i2 ... x 2iT
... x ki1 ... x ki2 ... ... ... x kiT
ei1 ei2 ... eiT
æ ç ç ç ç ç è
ö ÷ ÷ ÷ ÷ ÷ ø
æ ç ç ç ç ç è
æ ç ç ç ç ç è
ö ÷ ÷ ÷ ÷ ÷ ø
ö ÷ ÷ ÷ ÷ ÷ ø
T´1
T´K
T´1
Eq. reduces to Y = α’D + X β + ε
Here, D is the NT x N matrix for dummy regressor and can be
6/6/2022
Mr U_KHOA TOÁN KINH TẾ
expressed as D = IN eTÄ
Ä
53
A Ä B =
...
...
...
a1mB a11B a12B ... a 21B a 22B ... a 2mB ... a n1B a n2B ... a nmB
ö ÷ ÷ ÷ ÷ ÷ ø
nn1´mm1
A Ä B
A Ä B
= A-1 Ä B-1
A Ä B
Kronecker product A B of two matrices A = (aij)nm and B =
(bkl)n1m1 is defined by æ ç ç ç ç ç è )' = A 'Ä B' )-1 ( ) C Ä D
( ( (
) = AC Ä BD
6/6/2022
Mr U_KHOA TOÁN KINH TẾ
54
Assumption 3.1 The error term εit are i.i.d ( it) with:
ε when t =s and = 0 if t ≠ s or E (εiε’
i) = σ2
εIT here IT
• E (εit) = 0 • E (εitεis) = σ2
denotes the identity matrix (T,T)
j)= 0T here 0T denotes the
i ≠ j, • E (εitεjs) = 0 , (ts), or E (εiε’
identity matrix (T,T)
Theorem 3.1 Under assumption (3.1), OLS estimator of
6/6/2022
Mr U_KHOA TOÁN KINH TẾ
parameters (β) is the best linear unbiased estimator (BLUE)
55
N
N
'
S
y
X
e
y
X
(3.15)
=
b
(
) (
)
u
' e e = i i
i
- a - b i
i
i
e - a - i
i
å
å
i 1 =
i 1 =
Taking partial derivates Eq. (3.15) with respect to αi and β setting them to
zero, we have
Pre Example (3.1) With model
6/6/2022
Mr U_KHOA TOÁN KINH TẾ
The OLS estimator of αi and β are obtained by minmising
ROAA = f(HHI, L_A, SIZE, ASSET_GRO, GDP, INF) + ε
Remark. There are too many parameters in the fixed effects model and
56
the loss of degrees of freedom can be avoided if the αi can be assumed
random
Homework. With three research include:
1. Grunfeld Investment Equation (p.21)
2. Gasoline Demand (p.23)
3. Public Capital Productivity (p.25)
a) Estimate parameters ahead of the explanatory variables in those study
by Within estimator, Between estimator, LSDV and FEM by command
xtreg.
b) Comparing results receiving from those models
6/6/2022
c) Explanatory about αi parameters in method LSDV
Mr U_KHOA TOÁN KINH TẾ