

























Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Community
Ask the community for help and clear up your study doubts
Discover the best universities in your country according to Docsity users
Free resources
Download our free guides on studying techniques, anxiety management strategies, and thesis advice from Docsity tutors
Maximum Likelihood Estimation, Random Effects Linear Model, Error Components Model, Panel Data Algebra, Quadrature, Convergence Results, Balanced Nested Panel Data are points which describes this lecture importance in Econometric Analysis of Panel Data course.
Typology: Slides
1 / 33
This page cannot be seen from the preview
Don't miss anything!
6. Maximum Likelihood Estimation of
the Random Effects Linear Model
The Random Effects Model
i
it
i
i
it
i
i
it it i it
i i i i i
i i i i i i i
N
i=1 i
1 2 N
y = +c +ε , observation for person i at time t
= +c + , T observations in group i
= + + , note (c , c ,...,c )
= + + , T observations in the sample
c=( , ,... ) ,
x β
y X β i ε
X β c ε c
y Xβ c ε
c c c
N
i=1 i
Σ T by 1 vector
Notation
2 2 2 2
u u u
2 2 2 2
u u u
i i
2 2 2 2
u u u
2 2
u i i
2 2
u
i
1
2
N
Var[ +u ]
= T T
=
=
Var[ | ]
=
′
′
=
i
i
T
T
ε i
I ii
I ii
Ω
Ω 0 0
0 Ω 0
w X
0 0 Ω
ε
ε
ε
ε
ε
σ σ σ σ
σ σ σ σ
σ σ σ σ
σ σ
σ σ
i
(Note these differ only
in the dimension T )
Maximum Likelihood
i
it i
i1 i2 iT i i
i i
2 2
u
Assuming normality of and u.
Treat T joint observations on [( , ,... ),u ] as one T
variate observation. The mean vector of u is zero
and the covariance matrix is = I.
logL=
ε
ε
ε ε ε
′ σ + σ
i
ε i
Ω ii
N
i=1 i
2 2
i u i
i
logL where
logL ( , ) = T log 2 log | | ( ) ( )
2
= T log 2 log | |
2
ε
Σ
′ σ σ π + +
′ π + +
-
i i i i i i
-
i i i i
β, Ω y - X β Ω y - X β
Ω ε Ω ε
Panel Data Algebra (3, cont.)
i
2 2 2 2 2
u
T 2
t 1
2 2
= = [ ]=
| |=( ) , = a characteristic root of
Roots are (real) solutions to =
= = + or ( ) ( 1)
Any vector whose elements sum to zero (
ε ε ε
ε
=
′ ′ σ + σ σ + ρ σ
σ λ
λ
′ ′ λ ρ ρ λ
∏
i
i
T
i t
Ω I ii I ii A
Ω A
Ac c
Ac c c ii c i i c = - c
i i
2 2
i
=0)
is a characteristic vector that corresponds to root = 1.
There are T -1 such vectors, so T - 1 of the roots are 1.
Suppose 0. Premultiply by to find
( ) ( 1) = T ( )
′
λ
′ ′ ≠
′ ′ ′ ′ ρ λ ρ
i c
i c i
i i i c = - i c i c
i
i i
2
i
T
2 T 2 T 2
t i
t 1
=( 1). Since 0,
divide by it to obtain the remaining root =1+T.
Therefore, | |=( ) ( ) (1 T )
ε ε
=
′ ′ λ ≠
λ ρ
σ λ = σ + ρ
∏ i
- i c i c
Ω
Panel Data Algebra (3, conc.)
i i
2 2
2 2 i i
i i i i i 2 2 2
i u
N
i 1 i
2 N N 2 N
i 1 i i 1 i i 1 i 2
logL T log 2 log | |
2
(T ) -1 1
T log 2 T log log(1 T )
2 T
logL logL
-1 1
[(log 2 log ) T + log(1 T )]
2 2
ε
ε
ε ε
=
ε = = =
ε
′
= π + +
σ ε
′ = π + σ + + ρ + −
σ σ + σ
= Σ
′ = π + σ Σ Σ + ρ − Σ
σ
-
i i i i
Ω ε Ω ε
ε ε
ε ε
2 2
i i
i 2 2
i u
(T )
T
ε
ε
σ ε
−
σ + σ
Direct Maximization of LogL
2 2 2
u i i i i
2
i i i i i i i
Simpler : Take advantage of the invariance of maximum
likelihood estimators to transformations of the parameters.
Let =1/ , = / , R T 1, Q / R ,
logL (1 / 2)[ ( Q (T ) ) logR T log T l
ε ε
θ σ τ σ σ = τ + = τ
′ = − θ − ε + + θ +
i i
ε ε og 2 ]
Can be maximized using ordinary optimization methods (not
Newton, as suggested by Hsiao). Treat as a standard nonlinear
optimization problem. Solve with iterative, gradient methods.
π
Application – ML vs. FGLS
Simulated Likelihood Function
i
T 2 N 2 2 2
u i 1 t 1 it u i
i
i
The conditional log likelihood for the sample is then
logL( , , | ) ( 1 / 2)[log 2 log (y - - v ) ]
The unconditional log likelihood is obtained by integrating v out of
L ( ,
ε = = ε ε
′ σ θ = Σ Σ − π − θ + θ σ
it
β v x β
β
i
i
2 2
u i i u
T 2 2 2
t 1 it u i i i
2
v i u i
, | v ); logL ( , , )
( 1 / 2)[log 2 log (y - - v ) ] (v )dv
E logL ( , , | v )
The integral usually does not have a closed form. (For the normal distribution
ab
ε ε
∞
= ε ε
−∞
ε
σ θ σ θ =
′ Σ − π − θ + θ σ φ
= σ θ
∫
it
β
x β
β
ove, actually, it does. We used that earlier. We ignore that for now.)
Computing the Expected LogL
i
i
2
i i
T 2 2 2
t 1 it u i i i
2
v i u i
How to compute the integral: First note, (v ) exp( v / 2) / 2
( 1 / 2)[log 2 log (y - - v ) ] (v )dv
E logL ( , , | v )
(1) Numerical (Gauss-Hermite) quadratur
∞
= ε ε
−∞
ε
φ = − π
Σ − π − θ + θ σ φ
= σ θ
it
x β
β
2 H
v
h h
h 1
e for integrals of this form is
remarkably accurate;
e g(v)dv w g(a )
∞
−
=
−∞
Example: Hermite Quadrature Nodes and Weights, H=
Nodes: -2.02018,-0.95857, 0.00000, 0.95857, 2.
Weights: 1.99532,0.39362, 0.94531, 0.39362, 1.
Applications usually use many more points, up to 96 and
Much more accurate (more digits) representations.
i
i
T 2 2 2
t 1 it u i i i
2
i i
i i i i i i
2 T 2 2
i t 1 it u
( 1 / 2)[log 2 log (y - - v ) ] (v )dv
(v ) exp( v / 2) / 2
Make a change of variable to a v / 2 ,v = 2 a , dv = 2 da
exp( a ) [log 2 log (y - - 2
∞
= ε ε
−∞
∞
= ε ε
−∞
Σ − π − θ + θ σ φ
φ = − π
− Σ π − θ + θ σ
π
it
it
x β
x β
i
i
2
i i
2 T 2 2 2
i t 1 it u i i
2 T 2 2 2
i t 1 it u i i
2 H
i i i h 1 h h
a ) ] 2 da
exp( a ) [log 2 log (y - - ( 2 a )) ] da
exp( a ) [log 2 log (y - - ( 2 a )) ] da
exp( a )g a da w g(a )
∞
= ε ε
−∞
∞
= ε ε
−∞
∞
=
−∞
− Σ π − θ + θ σ
π
− Σ π − θ + θ σ
π
π π
it
it
x β
x β
Simulation
i
i
2
i u
T 2 2 2
t 1 it u i i i
2
v i u i v i
The unconditional log likelihood is an expected value;
logL ( , , )
= ( 1 / 2)[log 2 log (y - - v ) ] (v )dv
E logL ( , , | v ) = E g(v )
An expected value can be
ε
∞
= ε ε
−∞
ε
σ θ
′ Σ − π − θ + θ σ φ
= σ θ
it
β
x β
β
{ }
i
i
R
T 2 2 2
v i t 1 it u i,r
r 1
T 2
t 1
'estimated' by sampling observations
and averaging them
1
ˆ
E g(v ) ( 1 / 2)[log 2 log (y - - v ) ]
R
The unconditional log likelihood function is then
1
( 1 / 2)[log 2 log
R
= ε ε
=
= ε
′ = Σ − π − θ + θ σ
Σ − π − θ
x β
{ }
N R
2 2
it u i,r
i 1 r 1
2
u i,1 i,R
i,r
(y - - v ) ]
This is a function of ( , | , , v ,..., v ),i 1,...,N
The random draws on v become part of the data, and the function
is maximized with respect to the
ε
= =
ε
′
θ σ =
it
i i
x β
β, y X
unknown parameters.
MSL vs. ML - Application
i
t