introduction to applied spatial econometrics attila varga dimetic pécs, july 3, 2009

42
Introduction to Applied Spatial Econometrics Attila Varga DIMETIC Pécs, July 3, 2009

Upload: ruth-doyle

Post on 17-Dec-2015

219 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: Introduction to Applied Spatial Econometrics Attila Varga DIMETIC Pécs, July 3, 2009

Introduction to Applied Spatial Econometrics

Attila Varga

DIMETIC Pécs, July 3, 2009

Page 2: Introduction to Applied Spatial Econometrics Attila Varga DIMETIC Pécs, July 3, 2009

Prerequisites

• Basic statistics (statistical testing)

• Basic econometrics (Ordinary Least Squares and Maximum Likelihood estimations, autocorrelation)

Page 3: Introduction to Applied Spatial Econometrics Attila Varga DIMETIC Pécs, July 3, 2009

EU Patent applications 2002

Page 4: Introduction to Applied Spatial Econometrics Attila Varga DIMETIC Pécs, July 3, 2009

Outline

• Introduction• The nature of spatial data• Modelling space• Exploratory spatial data analysis• Spatial Econometrics: the Spatial Lag and

Spatial Error models• Specification diagnostics• New developments in Spatial Econometrics• Software options

Page 5: Introduction to Applied Spatial Econometrics Attila Varga DIMETIC Pécs, July 3, 2009

Spatial Econometrics

„A collection of techniques that deal with the peculiarities caused by space in the statistical analysis of regional science models”

Luc Anselin (1988)

Page 6: Introduction to Applied Spatial Econometrics Attila Varga DIMETIC Pécs, July 3, 2009

Increasing attention towards Spatial Econometrics in Economics

• Growing interest in agglomeration economies/spillovers – (Geographical Economics)

• Diffusion of GIS technology and increased availability of geo-coded data

Page 7: Introduction to Applied Spatial Econometrics Attila Varga DIMETIC Pécs, July 3, 2009

The nature of spatial data

• Data representation: time series („time line”) vs. spatial data (map)

• Spatial effects:

spatial heterogeneity

spatial dependence

Page 8: Introduction to Applied Spatial Econometrics Attila Varga DIMETIC Pécs, July 3, 2009

Spatial heterogeneity

• Structural instability in the forms of:

– Non-constant error variances (spatial heteroscedasticity)

– Non-constant coefficients (variable coefficients, spatial regimes)

Page 9: Introduction to Applied Spatial Econometrics Attila Varga DIMETIC Pécs, July 3, 2009

Spatial dependence (spatial autocorrelation/spatial association)

• In spatial datasets „dependence is present in all directions and becomes weaker as data locations become more and more dispersed” (Cressie, 1993)

• Tobler’s ‘First Law of Geography’: „Everything is related to everything else, but near things are more related than distant things.” (Tobler, 1979)

Page 10: Introduction to Applied Spatial Econometrics Attila Varga DIMETIC Pécs, July 3, 2009

Spatial dependence (spatial autocorrelation/spatial association)

• Positive spatial autocorrelation: high or low values of a variable cluster in space

• Negative spatial autocorrelation: locations are surrounded by neighbors with very dissimilar values of the same variable

Page 11: Introduction to Applied Spatial Econometrics Attila Varga DIMETIC Pécs, July 3, 2009

EU Patent applications 2002

Page 12: Introduction to Applied Spatial Econometrics Attila Varga DIMETIC Pécs, July 3, 2009

Spatial dependence (spatial autocorrelation/spatial association)

• Dependence in time and dependence in space:– Time: one-directional between two

observations– Space: two-directional among several

observations

Page 13: Introduction to Applied Spatial Econometrics Attila Varga DIMETIC Pécs, July 3, 2009

Spatial dependence (spatial autocorrelation/spatial association)

• Two main reasons:

– Measurement error (data aggregation)– Spatial interaction between spatial units

Page 14: Introduction to Applied Spatial Econometrics Attila Varga DIMETIC Pécs, July 3, 2009

Modelling space

• Spatial heterogeneity: conventional non-spatial models (random coefficients, error compontent models etc.) are suitable

• Spatial dependence: need for a non-convential approach

Page 15: Introduction to Applied Spatial Econometrics Attila Varga DIMETIC Pécs, July 3, 2009

Modelling space

• Spatial dependence modelling requires an appropriate representation of spatial arrangement

• Solution: relative spatial positions are represented by spatial weights matrices (W)

Page 16: Introduction to Applied Spatial Econometrics Attila Varga DIMETIC Pécs, July 3, 2009

Modelling space

1. Binary contiguity weights matrices- spatial units as neighbors in different orders (first, second etc. neighborhood classes)

- neighbors:- having a common border, or- being situated within a given distance band

2. Inverse distance weights matrices

Page 17: Introduction to Applied Spatial Econometrics Attila Varga DIMETIC Pécs, July 3, 2009

Modelling space

• Binary contiguity matrices (rook, queen)

• wi,j = 1 if i and j are neighbors, 0 otherwise

• Neighborhood classes (first, second, etc)

W =

0100

1011

0101

0110

Page 18: Introduction to Applied Spatial Econometrics Attila Varga DIMETIC Pécs, July 3, 2009

Modelling space

• Inverse distance weights matrices

0)(

1

)(

1

)(

1)(

10

)(

1

)(

1)(

1

)(

10

)(

1)(

1

)(

1

)(

10

2

3,4

2

2,4

2

1,4

2

4,3

2

2,3

2

1,3

2

4,2

2

3,2

2

1,2

2

4,1

2

3,1

2

2,1

ddd

ddd

ddd

ddd

W =

Page 19: Introduction to Applied Spatial Econometrics Attila Varga DIMETIC Pécs, July 3, 2009

Modelling space

• Row-standardization:

• Row-standardized spatial weights matrices:

- easier interpretation of results (averageing of values)

- ML estimation (computation)

Page 20: Introduction to Applied Spatial Econometrics Attila Varga DIMETIC Pécs, July 3, 2009

Modelling space

• The spatial lag operator: Wy– is a spatially lagged value of the variable y– In case of a row-standardized W, Wy is the

average value of the variable: • in the neighborhood (contiguity weights)• in the whole sample with the weight decreasing

with increasing distance (inverse distance weights)

Page 21: Introduction to Applied Spatial Econometrics Attila Varga DIMETIC Pécs, July 3, 2009

Exploratory spatial data analysis

• Measuring global spatial association:

– The Moran’s I statistic:

a) I = N/S0 [i,j wij (xi -)(xj - ) / i(xi -)2]

normalizing factor: S0 =i,j wij

(w is not row standardized)

b) I* = i,j wij (xi -)(xj - ) / i(xi -)2

(w is row standardized)

Page 22: Introduction to Applied Spatial Econometrics Attila Varga DIMETIC Pécs, July 3, 2009

Global spatial association

• Basic principle behind all global measures:

- The Gamma index

= i,j wij cij

– Neighborhood patterns and value similarity patterns compared

Page 23: Introduction to Applied Spatial Econometrics Attila Varga DIMETIC Pécs, July 3, 2009

Global spatial association

• Significance of global clustering: test statistic compared with values under H0 of no spatial autocorrelation

- normality assumption

- permutation approach

Page 24: Introduction to Applied Spatial Econometrics Attila Varga DIMETIC Pécs, July 3, 2009
Page 25: Introduction to Applied Spatial Econometrics Attila Varga DIMETIC Pécs, July 3, 2009

Local indicatiors of spatial association (LISA)

A. The Moran scatterplotidea: Moran’s I is a regression coefficient of a regression of Wz on z when w is row standardized:

I=z’Wz/z’z (where z is the variable in deviations from the

mean)- regression line: general pattern- points on the scatterplot: local tendencies- outliers: extreme to the central tendency (2 sigma rule)- leverage points: large influence on the central tendency (2 sigma rule)

Page 26: Introduction to Applied Spatial Econometrics Attila Varga DIMETIC Pécs, July 3, 2009

Moran scatterplot

Page 27: Introduction to Applied Spatial Econometrics Attila Varga DIMETIC Pécs, July 3, 2009

Local indicators of spatial association (LISA)

B. The Local Moran statistic

Ii = zijwijzj

– significance tests: randomization approach

Page 28: Introduction to Applied Spatial Econometrics Attila Varga DIMETIC Pécs, July 3, 2009
Page 29: Introduction to Applied Spatial Econometrics Attila Varga DIMETIC Pécs, July 3, 2009

Spatial Econometrics

• The spatial lag model

• The spatial error model

Page 30: Introduction to Applied Spatial Econometrics Attila Varga DIMETIC Pécs, July 3, 2009

The spatial lag model

• Lagged values in time: yt-k

• Lagged values in space: problem (multi-oriented, two directional dependence)– Serious loss of degrees of freedom

• Solution: the spatial lag operator, Wy

Page 31: Introduction to Applied Spatial Econometrics Attila Varga DIMETIC Pécs, July 3, 2009

The spatial lag model

The general expression for the spatial lag model is

y = Wy + x +,

where y is an N by 1 vector of dependent observations, Wy is an N by 1 vector of lagged

dependent observations, is a spatial autoregressive parameter, x is an N by K matrix of

exogenous explanatory variables, is a K by 1 vector of respective coefficients, and is an N by

1 vector of independent disturbance terms.

Page 32: Introduction to Applied Spatial Econometrics Attila Varga DIMETIC Pécs, July 3, 2009

The spatial lag model

• Estimation

– Problem: endogeneity of wy (correlated with the error term)

– OLS is biased and inconsistent– Maximum Likelihood (ML) – Instrumental Variables (IV) estimation

Page 33: Introduction to Applied Spatial Econometrics Attila Varga DIMETIC Pécs, July 3, 2009

The spatial lag model

• ML estimation: The Log-Likelihood function

L = ln I - W - N/2 ln (2) - N/2 ln (2) - (y - Wy - x)’( y - Wy - x)/2 2

Maximizing the log likelihood with respect to , , and 2 gives the values of parameters that provide the highest likelihood of the joint occurrence of the sample of dependent variables

Page 34: Introduction to Applied Spatial Econometrics Attila Varga DIMETIC Pécs, July 3, 2009

The Spatial Lag model

• IV estimation (2SLS)

– Suggested instruments: spatially lagged exogenous variables

Page 35: Introduction to Applied Spatial Econometrics Attila Varga DIMETIC Pécs, July 3, 2009

The Spatial Error model

y = x +

with

= W + ,

where is the coefficient of spatially lagged autoregressive errors, W. Errors in are independently distributed.

Page 36: Introduction to Applied Spatial Econometrics Attila Varga DIMETIC Pécs, July 3, 2009

The Spatial Error model

• OLS: unbiased but inefficient

• ML estimation

The likelihood function for the regression with spatially autocorrelated error term is

L = ln I -W - N/2 ln (2) - N/2 ln (2) - (y - x)’(I - W)’(y - x)(I - W)/2 2

Page 37: Introduction to Applied Spatial Econometrics Attila Varga DIMETIC Pécs, July 3, 2009

Specification tests

Test

Formulation Distribution Source

MORAN

e’We/e’e

N(0,1)

Cliff and Ord (1981)

LM-ERR

(e’We/s2)2/T

2 (1)

Burridge(1980)

LM-ERRLAG

(e’We/s2)2 / [tr(W’W + W2) - tr(W’W + W2)A-1var()]

2 (1)

Anselin (1988/B)

LM-LAG

(e’Wy/s2) 2/ (RJ

2 (1)

Anselin (1988/B)

LM-LAGERR

(e'B'BWy) 2/(H - HVar()H'

2 (1)

Anselin et al. (1996)

Page 38: Introduction to Applied Spatial Econometrics Attila Varga DIMETIC Pécs, July 3, 2009

Steps in estimation

• Estimate OLS

• Study the LM Error and LM Lag statistics with ideally more than one spatial weights matrices

• The most significant statistic guides you to the right model

• Run the right model (S-Err or S-Lag)

Page 39: Introduction to Applied Spatial Econometrics Attila Varga DIMETIC Pécs, July 3, 2009

Table 6.2. OLS Regression Results for Log (Innovations) at the MSA Level (N=125, 1982) Model Jaffe ML -Spatial Lag Spatial Extended Jaffe Constant W_Log(INN) Log(RD) Log(RD75) Log(URD) Log(URD50) Log(LQ) Log(BUS) Log(LARGE) RANK

-1.045 (0.146)

0.540 (0.054)

0.112 (0.036)

-1.098 (0.143) 0.125

(0.055) 0.515

(0.053)

0.125 (0.035)

-1.134 (0.172)

0.504 (0.055) 0.001

(0.041) 0.132

(0.036) 0.037

(0.018)

-1.407 (0.212)

0.277 (0.057) -0.027 (0.037) 0.093

(0.034) 0.032

(0.015) 0.652

(0.163) 0.332

(0.057) -0.337 (0.094) 0.202

(0.101) R2 - adj Log-Likelihood

0.599 -65.336

-62.708

0.611 -62.402

0.725 -36.683

Kiefer-Salmon White B-P LM-Err D50 D75 IDIS2 LM-Lag D50 D75 IDIS2 LR-Lag D50

1.899

1.183

1.465 2.688 1.691

5.620 2.968 2.039

0.243

0.000 0.737 0.008

5.256

9.024

0.936 2.178 1.102

1.026 1.485 0.659

37.847

0.102 0.060 0.045

0.450 1.593 0.625

Notes: Estimated standard errors are in parentheses; critical values for the White statistic with respectively 5, 20, and 35 degrees of freedom are 11.07, 31.41, and 49.52 (p=0.05); critical value for the Kiefer-Salmon test on normality and the Breusch-Pagan (B-P) test for heteroskedasticity is 5.99 (p=0.05); critical values for LM-Err, LM-Lag and LR-Lag statistics are 3.84 (p=0.05) and 2.71 (p=0.10); spatial weights matrices are row-standardized: D50 is distance-based contiguity for 50 miles; D75 is distance-based contiguity for 75 miles; and IDIS2 is inverse distance squared.

Example: Varga (1998)

Page 40: Introduction to Applied Spatial Econometrics Attila Varga DIMETIC Pécs, July 3, 2009

Spatial econometrics: New developments

• Estimation: GMM

• Spatial panel models

• Spatial Probit, Logit, Tobit

Page 41: Introduction to Applied Spatial Econometrics Attila Varga DIMETIC Pécs, July 3, 2009

Study materials

• Introductory:– Anselin: Spacestat tutorial (included in the

course material)– Anselin: Geoda user’s guide (included in the

course material)

• Advanced:– Anselin: Spatial Econometrics, Kluwer 1988

Page 42: Introduction to Applied Spatial Econometrics Attila Varga DIMETIC Pécs, July 3, 2009

Software options

• GEODA – easiest to access and use

• SpaceStat

• R

• Matlab routines