14 spatial panel 22 author: luc created date: 5/21/2017 8:22:02 pm
Post on 06-Oct-2020
0 Views
Preview:
TRANSCRIPT
Copyright © 2017 by Luc Anselin, All Rights Reserved
Luc Anselin
Spatial Regression14. Spatial Panels (2)
http://spatial.uchicago.edu
1
Copyright © 2017 by Luc Anselin, All Rights Reserved
• fixed effects models
• random effects models
• ML estimation
• IV/2SLS estimation
• GM estimation
• specification tests
2
Copyright © 2017 by Luc Anselin, All Rights Reserved
Fixed Effects Models
3
Copyright © 2017 by Luc Anselin, All Rights Reserved
Model Specification
4
Copyright © 2017 by Luc Anselin, All Rights Reserved
• Fixed Effects
• unobserved heterogeneity αi
• individual-specific but constant over time
• if included as indicator variables, can be correlated with other explanatory variables
• fixed N approach, for large N or asymptotics with N creates incidental parameter problem
5
Copyright © 2017 by Luc Anselin, All Rights Reserved
• Spatial Fixed Effects
• individual heterogeneity
• indicator variable for each location
• yi,t = αi + Xi,tβ + εi,t
• yt = α + Xtβ + εt
• with α’ιN = 0, overall constant and N-1 αi or no constant in β
• y = (ιT ⊗ α) + Xβ + ε
6
Copyright © 2017 by Luc Anselin, All Rights Reserved
• Spatial Lag Fixed Effects
• standard pooled lag model, but with additional indicator variables
• yt = ρWyt + α + Xtβ + εt
• y = ρ(IT ⊗ WN)y + (ιT ⊗ α) + Xβ + ε
7
Copyright © 2017 by Luc Anselin, All Rights Reserved
• Spatial Error Fixed Effects
• standard pooled error model, but with additional indicator variables
• yt = α + Xtβ + εt
• with error term
• εt = λWN εt + ut
• εt = (IN - λWN)-1ut
• ε = [IT ⊗ (IN - λWN)]-1u
8
Copyright © 2017 by Luc Anselin, All Rights Reserved
Estimation Strategies
9
Copyright © 2017 by Luc Anselin, All Rights Reserved
• Within Estimator
• wipes out constant and any space-specific effects by taking deviations from group mean (over time) for each i
• for both dependent and explanatory variables
• zit - zim, with zim = Σt zit / T
• demeaning operator Q, a NT x NT matrix
• Qz, applied to a constant yields 0
• consistent estimate only for β not for the αi
10
Copyright © 2017 by Luc Anselin, All Rights Reserved
• Demeaning Operator
• Q = INT - (ιTιT’/T ⊗ IN)
• ⊗ is a Kronecker product
• each element in first matrix times second
• ιT is a T x 1 vector of ones
• ιTιT’ is a T x T matrix of ones
• non-standard formulation due to stacking of cross-sections
• standard textbook case = stacking of time series
• Q = INT - (IN ⊗ ιTιT’/T)
11
Copyright © 2017 by Luc Anselin, All Rights Reserved
• Properties of Q
• Q is idempotent
• QQ = Q’Q = Q
• Q is singular |Q| = 0
• requires a generalized inverse
• Q- such that QQ-Q = Q
12
Copyright © 2017 by Luc Anselin, All Rights Reserved
• Spatial Lag Model in De-Meaned Variables
• apply Q to y, Wy, X and ε
• QWy = WQy
• Qy = ρWQy + QXβ + Qε
• E[Qεε’Q'] = σ2 QQ’ = σ2 Q with Q singular
13
Copyright © 2017 by Luc Anselin, All Rights Reserved
• Spatial Error Model in De-Meaned Variables
• apply Q to y, Wy, X and ε
• QWε = WQε
• Qy = QXβ + Qε
• with Qε = λWQε + Qu
• E[Quu’Q'] = σ2 QQ’ = σ2 Q with Q singular
14
Copyright © 2017 by Luc Anselin, All Rights Reserved
Random Effects Models
15
Copyright © 2017 by Luc Anselin, All Rights Reserved
Model Specification
16
Copyright © 2017 by Luc Anselin, All Rights Reserved
• Individual-Level Heterogeneity
• yi,t = μi + Xi,tβ + νi,t
• μi random, becomes part of error term
• μi uncorrelated with X
• εi,t = μi + νit
• for each cross-section t
• εt = μ + νt ,
• μ as a Nx1 random vector
• ε = (ιT ⊗ IN)μ + ν
17
Copyright © 2017 by Luc Anselin, All Rights Reserved
• Variance Matrix Non-Spherical
• E[εε’] = E{[(ιT ⊗ IN)μ + ν][(ι’T ⊗ IN)μ’ + ν’]}
• no cross-correlation between μ and ν
• E[εε’] = Σ = σ2μ(ιTι’T ⊗ IN) + σ2ν INT
• NT x NT matrix dimension
18
Copyright © 2017 by Luc Anselin, All Rights Reserved
• Simplifying Results
• use matrix properties to simplify expressions for matrix determinant and inverse
• | Σ | = (σ2ν + Tσ2μ)N (σ2ν)T-1
• Σ-1 = (1/T) ιTι’T ⊗ [1/(σ2ν + Tσ2μ)] IN + (IT - (1/T) ιTι’T) ⊗ (1/σ2ν) IN
• no actual matrix inverse required
19
Copyright © 2017 by Luc Anselin, All Rights Reserved
ML random effects - Log L = -38077
! = σ2μ / σ2ν
= 0.283 σ2μ = 6.571σ2ν = 23.199
20
Copyright © 2017 by Luc Anselin, All Rights Reserved
• Spatial Lag with Random Effects
• special case of lag model with non-spherical error variance
• y = ρ(IT ⊗ WN)y + Xβ + ε
• with ε = (ιT ⊗ IN)μ + ν
• and E[εε’] = Σ = σ2μ(ιTι’T ⊗ IN) + σ2ν INT
21
Copyright © 2017 by Luc Anselin, All Rights Reserved
Spatial Error Autocorrelation in Random Effects Models
22
Copyright © 2017 by Luc Anselin, All Rights Reserved
• Three Main Specifications
• εt = μ + νt
• SAR in νt (Anselin 88)
• SAR in εt (Kapoor, Kelejian, Prucha 03)
• encompassing (Baltagi et al 06)
23
Copyright © 2017 by Luc Anselin, All Rights Reserved
• SAR in Time-Variant Component νt
• εt = μ + νt with νt = θWNνt + ut
• using B = IN - θWN, then νt = B-1ut
• ε = (ιT ⊗ IN)μ + (IT ⊗ B-1)u
• variance matrix
• Σ = σ2μ(ιTιT’ ⊗ IN) + σ2u[IT ⊗ (B’B)-1]
24
Copyright © 2017 by Luc Anselin, All Rights Reserved
• SAR in Error εt
• SAR process applies to full error term
• ε = θ(IT ⊗ WN)ε + ν, or, with B = I - θW
• ε = (IT ⊗ B-1)ν
• innovation ν as a one-way error component
• ν = (ιT ⊗ IN)μ + u
25
Copyright © 2017 by Luc Anselin, All Rights Reserved
• SAR in Error εt (continued)
• composite error term
• ε = (IT ⊗ B-1)[(ιT ⊗ IN)μ + u]
• variance
• Σ = (IT ⊗ B-1)[σ2uQ0 + σ21Q1](IT ⊗ B-1’)
• with
• σ21 = σ2u + T σ2μ
• Q0 = (IT - JT) ⊗ IN
• Q1 = JT/T ⊗ IN
• JT = ιTιT’
26
Copyright © 2017 by Luc Anselin, All Rights Reserved
• Comparison
• SAR in νt
• spatial spillovers only in time variant errors
• SAR in εt
• spatial spillovers in both permanent (individual heterogeneity μ) and time variant error components
• same mechanism in both
• different conceptualizations of spatial effects
27
Copyright © 2017 by Luc Anselin, All Rights Reserved
• Encompassing Model
• permanent spatial correlation (random effect)
• μ = θ1WNμ + u1 = (I - θ1WN)-1u1 = A-1u1
• time variant spatial correlation
• νt = θ2WNνt + u2t = (I - θ2WN)-1u2t = B-1u2t
• composite error
• ε = (ιT ⊗ IN)A-1u1 + (IT ⊗ B-1)u2
28
Copyright © 2017 by Luc Anselin, All Rights Reserved
• Encompassing Model (continued)
• overall variance
• Σ = σ2u1[ιTιT’ ⊗ (A’A)-1] + σ2u2[IT ⊗ (B’B)-1]
• special cases
• θ1 = 0 → model in νt
• θ1 = θ2 → model in εt
• θ1 = θ2 = 0 → non-spatial random effects
29
Copyright © 2017 by Luc Anselin, All Rights Reserved
Estimation Strategies
30
Copyright © 2017 by Luc Anselin, All Rights Reserved
• Maximum Likelihood
• special case of model with non-spherical error variance matrix Σ
• complex log-likelihood function
• spatial lag model with error components
• spatial error model with error components
31
Copyright © 2017 by Luc Anselin, All Rights Reserved
• IV/2SLS Estimation
• spatial lag model as special case of model with endogenous explanatory variables
• Baltagi (1981) error components 2SLS estimator
32
Copyright © 2017 by Luc Anselin, All Rights Reserved
• Generalized Moments Estimator
• only for Kapoor et al spatially correlated error components model
• generalization of Kelejian-Prucha generalized moments estimator in cross-sectional regression
33
Copyright © 2017 by Luc Anselin, All Rights Reserved
ML Estimation
34
Copyright © 2017 by Luc Anselin, All Rights Reserved
• ML Spatial Lag
• spatial lag model with error components
• complex log-likelihood function
35
Copyright © 2017 by Luc Anselin, All Rights Reserved
ML Lag random effects - Log L = -38023
! = σ2μ / σ2ν
= 0.263 σ2μ = 6.095σ2ν = 23.145ρ = 0.132
36
Copyright © 2017 by Luc Anselin, All Rights Reserved
• ML Spatial Error with Error Components
• special case of non-spherical error variance-covariance
• likelihood function contains determinant and inverse of the error variance-covariance matrix
37
Copyright © 2017 by Luc Anselin, All Rights Reserved
• Variance (Anselin-Baltagi specification)
• slight reparameterization
38
Copyright © 2017 by Luc Anselin, All Rights Reserved
• Determinant and Inverse
• determinant
• inverse
39
Copyright © 2017 by Luc Anselin, All Rights Reserved
• Likelihood
complex optimization problem
often fails to converge
40
Copyright © 2017 by Luc Anselin, All Rights Reserved
• KPP Specification
• variance expression in log-likelihood
• Σ = (IT ⊗ B-1)[σ2uQ0 + σ21Q1](IT ⊗ B-1’)
• with
• σ21 = σ2u + T σ2μ
• Q0 = (IT - JT) ⊗ IN
• Q1 = JT/T ⊗ IN
• JT = ιTιT’
41
Copyright © 2017 by Luc Anselin, All Rights Reserved
! = σ2μ / σ2ν
= 0.274 σ2μ = 6.353σ2ν = 23.159λ = 0.103
ML Error KKP - Log L = -38052
42
Copyright © 2017 by Luc Anselin, All Rights Reserved
IV/2SLS Estimation
43
Copyright © 2017 by Luc Anselin, All Rights Reserved
• Baltagi EC2SLS Estimator
• treat Wy as an endogenous variable
• instruments WX, W2X, etc.
• matrix weighted average of within and between 2SLS estimators
44
Copyright © 2017 by Luc Anselin, All Rights Reserved
• Baltagi EC2SLS Estimator (continued)
• three step process
• 2SLS within estimator
• demeaning operator Q applied to all variables and instruments, deviations from temporal mean
• 2SLS between estimator
• operator P, applied to all variables and instruments, temporal mean
• compute σ2μ and σ21 from respective residuals
• EC2SLS as matrix-weighted average
45
Copyright © 2017 by Luc Anselin, All Rights Reserved
Lag w Error Components - EC2SLS
σ21 = 45.336 σ2μ = 5.635σ2ν = 22.796ρ = 0.344
46
Copyright © 2017 by Luc Anselin, All Rights Reserved
GM Estimation
47
Copyright © 2017 by Luc Anselin, All Rights Reserved
• GM Estimation
• extension of GM estimator of Kelejian and Prucha (1998, 1999)
• nuisance parameter approach
• uses Kapoor et al. (2007) error component specification
• actual estimation is FGLS
48
Copyright © 2017 by Luc Anselin, All Rights Reserved
• Moment Equations
• notation
• equations
49
Copyright © 2017 by Luc Anselin, All Rights Reserved
GM KKP spatial error components
σ21 = 46.954 σ2μ = 5.858σ2ν = 23.522λ = 0.124
50
Copyright © 2017 by Luc Anselin, All Rights Reserved
comparison of estimates
51
Copyright © 2017 by Luc Anselin, All Rights Reserved
Specification Tests
52
Copyright © 2017 by Luc Anselin, All Rights Reserved
• Test Strategies in Error Components Models
• tests are LM, based on estimation under the null
• null can be standard OLS model
• no spatial effects, no error components
• null can be a random effects or a spatial model
• random effects model, no spatial effects
• spatial model, no random effects
53
Copyright © 2017 by Luc Anselin, All Rights Reserved
• Classification of Tests
• marginal
• single null hypothesis, irrespective of values for other parameters
• joint
• composite null hypothesis, considering all the parameters
• conditional
• single null hypothesis, conditional on value(s) of other parameter(s)
54
Copyright © 2017 by Luc Anselin, All Rights Reserved
• Examples of Null Hypotheses
• marginal
• H0: θ = 0
• joint
• H0: θ = 0 and σ2μ = 0
• conditional
• H0: θ = 0 with σ2μ ≥ 0
• H0: σ2μ = 0 with θ ≠ 0
55
Copyright © 2017 by Luc Anselin, All Rights Reserved
• Test Statistics
• complex expressions
• see Anselin et al (2006), Baltagi et al (2003)
• example
• conditional test for H0: θ = 0 with σ2μ ≥ 0 is "2(1)
56
top related