Spatial Econometric Analysis Using GAUSS 10 Kuan-Pin Lin Portland State University.

37
Spatial Econometric Analysis Using GAUSS 10 Kuan-Pin Lin Portland State University

description

Spatial Panel Data Models Assumptions Fixed Effects Random Effects Spatial Error Model: A=I or =0 Spatial Lag Model: B=I or  =0 Panel Data Model: A=B=I

Transcript of Spatial Econometric Analysis Using GAUSS 10 Kuan-Pin Lin Portland State University.

Page 1: Spatial Econometric Analysis Using GAUSS 10 Kuan-Pin Lin Portland State University.

Spatial Econometric Analysis Using GAUSS

10

Kuan-Pin LinPortland State University

Page 2: Spatial Econometric Analysis Using GAUSS 10 Kuan-Pin Lin Portland State University.

Spatial Panel Data Models The General Model

1 1

( )( )

( )[ ( )( )]( ), ( )

T

T T

T T T

N N

WW

A Bwhere A W B W

y I y Xβ εε I ε i u v

y I Xβ I i u vI I

Page 3: Spatial Econometric Analysis Using GAUSS 10 Kuan-Pin Lin Portland State University.

Spatial Panel Data Models AssumptionsFixed EffectsRandom Effects

Spatial Error Model: A=I or =0Spatial Lag Model: B=I or =0Panel Data Model: A=B=I

2 1( | , ) ( ' )v TVar W B B ε X I

2 2 1

( | , )

( ) ( ' )u T v T

Var W

B B

ε XJ I

( | , ) 0E W ε X

Page 4: Spatial Econometric Analysis Using GAUSS 10 Kuan-Pin Lin Portland State University.

Spatial Panel Data Models Example: U. S. Productivity (48 States, 17 Years)

Panel Data Model ln(GSP) = + ln(Public) + 2ln(Private) + 3ln(Labor) + 4(Unemp) + u + v

Spatial Lag Model ln(GSP) = + ln(Public) + 2ln(Private) + 3ln(Labor)+ 4(Unemp)

+ λW ln(GSP) + u + v

Spatial Error Model ln(GSP) = + ln(Public) + 2ln(Private) + 3ln(Labor) + 4(Unemp) + W e eu + v

Spatial Mixed Model ln(GSP) = + ln(Public) + 2ln(Private) + 3ln(Labor) + 4(Unemp) +

λW ln(GSP) + W e eu + v

Page 5: Spatial Econometric Analysis Using GAUSS 10 Kuan-Pin Lin Portland State University.

Model Estimation Based on panel data models (pooled, fixed

effects, random effects), we consider: Spatial Error Model Spatial Lag Model Spatial Mixed Model

Model Estimation Generalized Least Squares (IV/GLS) Generalized Method of Moments (GMM/GLS) Maximum Likelihood Estimation

Page 6: Spatial Econometric Analysis Using GAUSS 10 Kuan-Pin Lin Portland State University.

Spatial Lag Model Estimation

The Model: SPLAG(1)

OLS is biased and inconsistent.

( )

(( ) , ) 0

T

T

T

W

Cov W

y I y Xβ εε i u v

I y ε

( )

' 'T W

Z I y X

δ βy Zδ ε

Page 7: Spatial Econometric Analysis Using GAUSS 10 Kuan-Pin Lin Portland State University.

Spatial Lag Model Estimation Fixed Effects

2 2( ) ( ) ( )T

v NT vVar Var Var

y Zδ i u v y Zδ vε v I v Q

, ,( )T T N

where

y = Qy Z = QZ v = QvQ I J I

Page 8: Spatial Econometric Analysis Using GAUSS 10 Kuan-Pin Lin Portland State University.

Spatial Lag Model Estimation Fixed Effects: IV or 2SLS

Instrumental Variables

Two-Stage Least Squares

1 2 1

2

ˆ ˆ ˆˆ ˆ ˆ( ' ) ' , ( ) ( ' )ˆ ˆ ˆ ˆˆ ' / ( 1),

v

v

Var

N T

δ Z Z Z y δ Z Z

v v v y Zδ

1ˆ ( ' ) 'Z H H H H Z

2

( | ) 0, ( , ) 0

, T

E Cov

where W

v H Z H

H X WX W X W I

Page 9: Spatial Econometric Analysis Using GAUSS 10 Kuan-Pin Lin Portland State University.

Spatial Lag Model EstimationRandom Effects

2 2( ) ( )T

u T v T NVar

y Zδ εε i u v

ε Ω J I I

2 2 2 2 21 1,

( ) ,v u v

T T N T N

T

where

1

1

Ω Q QQ I J I Q J I

Page 10: Spatial Econometric Analysis Using GAUSS 10 Kuan-Pin Lin Portland State University.

Spatial Lag Model Estimation Random Effects: IV/GLS

Instrumental Variables

Two-Stage Generalized Least Squares

1 1 1

1 1

ˆ ˆ ˆ( ' ) 'ˆ ˆ( ) ( ' )Var

δ Z Ω Z Z Ω y

δ Z Ω Z

1ˆ ( ' ) 'Z H H H H Z

2

( | ) 0, ( , ) 0

, T

E Cov

where W

ε H Z H

H X WX W X W I

Page 11: Spatial Econometric Analysis Using GAUSS 10 Kuan-Pin Lin Portland State University.

Spatial Lag Model Estimation Random Effects: IV/GLS

Feasible Generalized Least SquaresEstimate v

2 and u2 from the fixed effects model:

FGLS for random effects model:1 1 1 1 1ˆ ˆ ˆ ˆ ˆˆ ˆ ˆ( ' ) ' , ( ) ( ' )Var δ Z Ω Z Z Ω y δ Z Ω Z

11

2 2

2 2 1 2 2

ˆ ˆˆ ˆ ˆ ˆ ˆ( ' ) ' , , /

ˆ ˆ ˆ ˆˆ ˆ' / ( 1), ' /ˆ ˆˆ ˆ ˆ ˆ( ) , ( )

TFE FE i itt

v u

u T v T N u T v T N

v v T

N T N

δ Z Z Z y v y Zδ

v v v v

Ω J I I Ω J I I

Page 12: Spatial Econometric Analysis Using GAUSS 10 Kuan-Pin Lin Portland State University.

Spatial Error Model Estimation The Model: SPAR(1)

Fixed Effects Random Effects

( )T

T

Wi

y Xβ εε I ε ee u v

2 2 2 2 21 1( ,

( ) ,v u v

T T N T N

Var T

1

1

e) Q QQ I J I Q J I

2( ) ( ) v NTVar Var e v I

1 1( ) ( ) ( )( ) 'T T

N

Var B Var Bwhere B W

ε I e II

Page 13: Spatial Econometric Analysis Using GAUSS 10 Kuan-Pin Lin Portland State University.

Spatial Error Model EstimationFixed Effects

Moment Functions 2

2

( ' ) / ( 1)

( ' ) / ( 1) ( ' ) /

( ' ) / ( 1) 0

v

v

E N T

E N T trace W W N

E N T

v v

v v

v v

* *

* *

, ( )

[ ( )] , [ ( )]T

T N T N

where W

W W

v y - X β v I v

y I I y X I I X

Page 14: Spatial Econometric Analysis Using GAUSS 10 Kuan-Pin Lin Portland State University.

Spatial Error Model Estimation Fixed Effects

The Model: SPAR(1)

Estimate and iteratively: GMM/GLS OLS GMM GLS

* *

( )T W

y Xβ εy X β v

ε I ε v

* *

ˆ

ˆ ˆ ˆ( ) ( ) ( )ˆˆ ˆ( ) ( )

T W

y Xβ ε β

ε β I ε β v

y X β v β

Page 15: Spatial Econometric Analysis Using GAUSS 10 Kuan-Pin Lin Portland State University.

Spatial Error Model Estimation Random Effects

Moment Functions (Kapoor, Kelejian and Prucha, 2006)

2

2

( ' ) / ( 1)

( ' ) / ( 1) ( ' ) /( ' ) / ( 1) 0

v

v

E N T

E N T trace W W NE N T

e Qe

e Qee Qe

21 1

21 1

1

( ' ) /

( ' ) / ( ' ) /( ' ) / 0, ( )T

E N

E N trace W W NE N where W

e Q e

e Q ee Q e e I e

Page 16: Spatial Econometric Analysis Using GAUSS 10 Kuan-Pin Lin Portland State University.

Spatial Error Model Estimation Random Effects

The Model: SPAR(1)

Estimate and iteratively: GMM/GLS OLS GMM GLS

* *

( )TT

T

W

y Xβ εy X β e

ε I ε ee i u v

e i u v

* *

ˆ

ˆ ˆ ˆ( ) ( ) ( )ˆˆ ˆ( ) ( )

T W

y Xβ ε β

ε β I ε β e

y X β e β

* *[ ( )] , [ ( )]T N T Nwhere W W y I I y X I I X

Page 17: Spatial Econometric Analysis Using GAUSS 10 Kuan-Pin Lin Portland State University.

Spatial Mixed Model Estimation

The Model: SARAR(1,1)

1

( )( )

( )( )

( ) , ' '

T

T T

T T

T

N

WW i

B

where W

and B W

y I y Xβ εε I ε u v

y Zδ I i u vZ I y X δ βI

Page 18: Spatial Econometric Analysis Using GAUSS 10 Kuan-Pin Lin Portland State University.

Spatial Mixed Model Estimation Two-Stage EstimationSample moment functions are the same as in the

spatial error AR(1) model. The efficient GMM estimator follows exactly the same as the spatial error AR(1) model.

The transformed model which removes spatial error AR(1) correlation is estimated the same way as the spatial lag model using IV and GLS.

Page 19: Spatial Econometric Analysis Using GAUSS 10 Kuan-Pin Lin Portland State University.

Spatial Mixed Model Estimation Fixed Effects

The Model: SPARAR(1,1)

* * *

( )( )

( )( )

( )

TT

TT

T

T

WW

WW

W

y I y Xβ εy I y Xβ ε

ε I ε eε I ε v

e i u v

y I y X β v

* *

,..., ( )

[ ( )] , [ ( )]T N

T N T N

where

W W

y Qy Q I J I

y I I y X I I X

Page 20: Spatial Econometric Analysis Using GAUSS 10 Kuan-Pin Lin Portland State University.

Spatial Mixed Model Estimation Fixed Effects

Estimate and iteratively: GMM/GLS IV/2SLS GMM GLS * * *

ˆ ˆ( ) ,ˆ ˆ ˆ ˆ ˆ( , ) ( ) ( , )

ˆ ˆˆ ˆ ˆ( ) ( ) ( ) ( ) ,

T

T

T

W

W

W

y I y Xβ ε β

ε β I ε β v

y I y X β v β

* *( ) [ ( )] , ( ) [ ( )]T N T Nwhere W W y I I y X I I X

Page 21: Spatial Econometric Analysis Using GAUSS 10 Kuan-Pin Lin Portland State University.

Spatial Mixed Model Estimation Random Effects

The Model: SPARAR(1,1)

* * *

( )( )

( )

T

T

T

T

T

WW

W

y I y Xβ εε I ε ee i u v

y I y X β ee i u v

* *[ ( )] , [ ( )]T N T Nwhere W W y I I y X I I X

Page 22: Spatial Econometric Analysis Using GAUSS 10 Kuan-Pin Lin Portland State University.

Spatial Mixed Model Estimation Random Effects

Estimate and iteratively: GMM/GLS IV/2SLS GMM GLS

2 2

* * *

2 2

ˆ ˆ( ) ,ˆ ˆ ˆ ˆ ˆ ˆ ˆ( , ) ( ) ( , ) , ,

ˆ ˆˆ ˆ ˆ( ) ( ) ( ) ( ) ,ˆ ˆ ˆ( , )

T

T v u

T

v u

W

W

W

with

y I y Xβ ε β

ε β I ε β e

y I y X β e β

* *( ) [ ( )] , ( ) [ ( )]T N T Nwhere W W y I I y X I I X

Page 23: Spatial Econometric Analysis Using GAUSS 10 Kuan-Pin Lin Portland State University.

Example: U. S. ProductivityBaltagi (2008) [munnell.5]

Spatial Panel Data Model: GMM/GLS (Spatial Error) ln(GSP) = + ln(Public) + 2ln(Private) + 3ln(Labor) + 4(Unemp) + =ρW + e, e = iu + v

FixedEffects s.e

RandomEffects s.e

0.005 0.026 0.031 0.023

0.202* 0.024 0.273* 0.021

3 0.782* 0.029 0.736* 0.025

4 -0.002* 0.001 -0.005* 0.001

0 - - 2.222* 0.136

ρ 0.578* 0.046 0.321* 0.060

Page 24: Spatial Econometric Analysis Using GAUSS 10 Kuan-Pin Lin Portland State University.

Example: U. S. ProductivityBaltagi (2008) [munnell.5]

Spatial Panel Data Model: GMM/GLS (Spatial Mixed) ln(GSP) = + ln(Public) + 2ln(Private) + 3ln(Labor) + 4(Unemp) + λW ln(GSP) + =ρW + e , e = iu + v

FixedEffects s.e

RandomEffects s.e

-0.010 0.026 0.040 0.024

0.185* 0.025 0.259* 0.022

3 0.756* 0.029 0.728* 0.026

4 -0.003* 0.001 -0.005* 0.001

0 - - 2.031* 0.174

λ 0.093* 0.024 0.030* 0.015

ρ 0.488* 0.051 0.312* 0.059

Page 25: Spatial Econometric Analysis Using GAUSS 10 Kuan-Pin Lin Portland State University.

Another ExampleChina Provincial Productivity [china.9]

Spatial Panel Data Model: GMM/GLS (Spatial Error) ln(Q) = + ln(L) + ln(K) + =ρW + e , e = iu + v

FixedEffects s.e

RandomEffects s.e

0.2928 0.073 0.4898 0.062

0.0282 0.017 0.0090 0.017

- - 2.6298 0.587

ρ 0.5013 0.059 0.6424 0.071

Page 26: Spatial Econometric Analysis Using GAUSS 10 Kuan-Pin Lin Portland State University.

Another ExampleChina Provincial Productivity [china.9]

Spatial Panel Data Model: GMM/GLS (Spatial Mixed) ln(Q) = + ln(L) + ln(K) + W ln(Q) + =ρW + e , e = iu + v

FixedEffects s.e

RandomEffects s.e

0.256 0.080 0.481 0.076

0.022 0.019 0.013 0.015

- - 6.513 2.394

λ 0.287 0.189 1.203 0.059

ρ 0.267 0.074 -0.475 0.239

Page 27: Spatial Econometric Analysis Using GAUSS 10 Kuan-Pin Lin Portland State University.

Maximum Likelihood Estimation Error Components

AssumptionsFixed Effects:Random Effects:

2~ ( , )v NTN v 0 I

2 2 '

~ ( , ),

,T N

u T v T T T T

N

e i u v 0 Ω Ω I

J I J i i

2 2~ ( , ), ~ ( , ),v NT u NN N t v 0 I u 0 I

T e i u + v

Page 28: Spatial Econometric Analysis Using GAUSS 10 Kuan-Pin Lin Portland State University.

Maximum Likelihood EstimationFixed Effects

Log-Likelihood Function

2 2

2

( , , , ) ln(2 ) ln( )2 2

' ln | | ln | |2

( ), ( )

( , , | , , ) ( )( ) ( )

v v

v

N N

T T T

NT NTL

T A T B

where A I W B I W

W I B I A I B

β

e e

e e β y X y Xβ

Page 29: Spatial Econometric Analysis Using GAUSS 10 Kuan-Pin Lin Portland State University.

Maximum Likelihood EstimationFixed Effects

Log-Likelihood Function (Lee and Yu, 2010)

Where z* is the transformation of z using the orthogonal eigenvector matrix of Q.

2 2

'* *

2

* * * *

( 1) ( 1)( , , , ) ln(2 ) ln( )2 2

( 1) ln | | ( 1) ln | |2

( ), ( )

( , , | , , ) ( )( ) ( )

v v

v

N N

T T T

N T N TL

T A T B

where A I W B I W

W I B I A I B

β

e e

e e β y X y X β

Page 30: Spatial Econometric Analysis Using GAUSS 10 Kuan-Pin Lin Portland State University.

Maximum Likelihood EstimationRandom Effects

Log-Likelihood Function2 2

'1

2 2 2 2

( , , , , )

1ln(2 ) ln | | ( ) ln | | ln | |2 2 2

( , )( ), ( )( , , | , , ) ( )( ) ( )

u v

N

T v u v u

N N

T T T

L

NT N I T A T B

where I JA I W B I W

W I B I A I B

β

e e

e e β y X y Xβ

Page 31: Spatial Econometric Analysis Using GAUSS 10 Kuan-Pin Lin Portland State University.

Example: U. S. ProductivityBaltagi (2008) [munnell.4]

Spatial Panel Data Model: QML (Spatial Lag) ln(GSP) = + ln(Public) + 2ln(Private) + 3ln(Labor) + 4(Unemp) + λW ln(GSP) + , = iu + v

FixedEffects s.e

RandomEffects s.e

-0.047 0.026 0.013 0.028

0.187* 0.025 0.226* 0.025

3 0.625* 0.029 0.671* 0.029

4 -0.005* 0.0009 -0.006* 0.0009

0 - - 1.658* 0.166

λ 0.275* 0.022 0.162* 0.029

Page 32: Spatial Econometric Analysis Using GAUSS 10 Kuan-Pin Lin Portland State University.

Example: U. S. ProductivityBaltagi (2008) [munnell.4]

Spatial Panel Data Model: QML (Spatial Error) ln(GSP) = + ln(Public) + 2ln(Private) + 3ln(Labor) + 4(Unemp) + =ρW + e , e = iu + v

FixedEffects s.e

RandomEffects s.e

0.005 0.026 0.045 0.027

0.205* 0.025 0.246* 0.023

3 0.782* 0.029 0.743* 0.027

4 -0.002* 0.001 -0.004* 0.001

0 - - 2.325 0.155

ρ 0.557* 0.034 0.527* 0.033

Page 33: Spatial Econometric Analysis Using GAUSS 10 Kuan-Pin Lin Portland State University.

Example: U. S. ProductivityBaltagi (2008) [munnell.4]

Spatial Panel Data Model: QML (Spatial Mixed) ln(GSP) = + ln(Public) + 2ln(Private) + 3ln(Labor) + 4(Unemp) + λW ln(GSP) + =ρW + e , e = iu + v

FixedEffects s.e

RandomEffects s.e

-0.010 0.027 0.044 0.023

0.191* 0.025 0.249* 0.023

3 0.755* 0.031 0.742* 0.027

4 -0.003* 0.001 -0.004* 0.001

0 - - 2.289* 0.212

λ 0.089 0.031 0.004 0.017

ρ 0.455* 0.052 0.522* 0.038

Page 34: Spatial Econometric Analysis Using GAUSS 10 Kuan-Pin Lin Portland State University.

Another ExampleChina Provincial Productivity [china.8]

Spatial Panel Data Model: QML (Spatial Lag) ln(Q) = + ln(L) + ln(K) + W ln(Q) + = iu + v

FixedEffects s.e

RandomEffects s.e

0.2203 0.0707 0.3794 0.074

0.0177 0.0163 -0.0046 0.016

- - 0.9081 0.626

λ 0.4361 0.0557 0.3941 0.055

Page 35: Spatial Econometric Analysis Using GAUSS 10 Kuan-Pin Lin Portland State University.

Another ExampleChina Provincial Productivity [china.8]

Spatial Panel Data Model: QML (Spatial Error) ln(Q) = + ln(L) + ln(K) + =ρW + e , e = iu + v

FixedEffects s.e

RandomEffects s.e

0.2969 0.073 0.4928 0.077

0.0297 0.017 0.0091 0.017

- - 2.6548 0.657

ρ 0.4521 0.058 0.4364 0.055

Page 36: Spatial Econometric Analysis Using GAUSS 10 Kuan-Pin Lin Portland State University.

Another ExampleChina Provincial Productivity [china.8]

Spatial Panel Data Model: QML (Spatial Mixed) ln(Q) = + ln(L) + ln(K) + W ln(Q) + =ρW + e , e = iu + v

FixedEffects s.e

RandomEffects s.e

0.143 0.058 0.247 0.062

0.004 0.013 -0.014 0.013

- - -0.119 0.496

λ 0.731 0.058 0.712 0.064

ρ -0.571 0.136 -0.563 0.145

Page 37: Spatial Econometric Analysis Using GAUSS 10 Kuan-Pin Lin Portland State University.

References Elhorst, J. P. (2003). Specification and estimation of

spatial panel data models, International Regional Science Review 26, 244-268.

Kapoor M., Kelejian, H. and I. R. Prucha, “Panel Data Models with Spatially Correlated Error Components,” Journal of Econometrics, 140, 2006: 97-130.

Lee, L. F., and J. Yu, “Estimation of Spatial Autoregressive Panel Data Models with Fixed Effects,” Journal of Econometrics 154, 2010: 165-185.