Lecture 3: Spatial Analysis with Stata

Similar documents
Analyzing spatial autoregressive models using Stata

Spatial Econometrics

Spatial Regression Models: Identification strategy using STATA TATIANE MENEZES PIMES/UFPE

Lecture 6: Hypothesis Testing

Comparing estimation methods. econometrics

Implementing procedures for spatial panel econometrics in Stata

On spatial econometric models, spillover effects, and W

Spatial Autocorrelation

Spatial Econometrics. Wykªad 6: Multi-source spatial models. Andrzej Torój. Institute of Econometrics Department of Applied Econometrics

Spatial Regression. 1. Introduction and Review. Luc Anselin. Copyright 2017 by Luc Anselin, All Rights Reserved

SPACE Workshop NSF NCGIA CSISS UCGIS SDSU. Aldstadt, Getis, Jankowski, Rey, Weeks SDSU F. Goodchild, M. Goodchild, Janelle, Rebich UCSB

Introduction to Spatial Statistics and Modeling for Regional Analysis

Testing for global spatial autocorrelation in Stata

Introduction to Spatial Econometric Analysis: Creating spatially lagged variables in Stata

Types of spatial data. The Nature of Geographic Data. Types of spatial data. Spatial Autocorrelation. Continuous spatial data: geostatistics

Spatial Regression. 9. Specification Tests (1) Luc Anselin. Copyright 2017 by Luc Anselin, All Rights Reserved

A SPATIAL ANALYSIS OF A RURAL LAND MARKET USING ALTERNATIVE SPATIAL WEIGHT MATRICES

Lecture 3: Exploratory Spatial Data Analysis (ESDA) Prof. Eduardo A. Haddad

Spatial Statistics For Real Estate Data 1

Lecture 3: Exploratory Spatial Data Analysis (ESDA) Prof. Eduardo A. Haddad

ON THE NEGATION OF THE UNIFORMITY OF SPACE RESEARCH ANNOUNCEMENT

Outline. Overview of Issues. Spatial Regression. Luc Anselin

Spanish exports and logistics needs. A spatial approach Abstract Keywords: JEL classification: Introduction

Creating and Managing a W Matrix

Testing Random Effects in Two-Way Spatial Panel Data Models

Knowledge Spillovers, Spatial Dependence, and Regional Economic Growth in U.S. Metropolitan Areas. Up Lim, B.A., M.C.P.

Lecture 1: Introduction to Spatial Econometric

GIS and Spatial Statistics: One World View or Two? Michael F. Goodchild University of California Santa Barbara

W-BASED VS LATENT VARIABLES SPATIAL AUTOREGRESSIVE MODELS: EVIDENCE FROM MONTE CARLO SIMULATIONS

ESTIMATION PROBLEMS IN MODELS WITH SPATIAL WEIGHTING MATRICES WHICH HAVE BLOCKS OF EQUAL ELEMENTS*

Spatial Data Mining. Regression and Classification Techniques

Proceedings of the 8th WSEAS International Conference on APPLIED MATHEMATICS, Tenerife, Spain, December 16-18, 2005 (pp )

Departamento de Economía Universidad de Chile

Human Capital, Technology Diffusion and Total Factor Productivity Growth in Regions

Spatial Econometrics Methods using Stata

Luc Anselin and Nancy Lozano-Gracia

Spatial Diffusion of Economic Shocks in Networks

Lecture 8. Spatial Estimation

No

Network data in regression framework

Reading Assignment. Distributed Lag and Autoregressive Models. Chapter 17. Kennedy: Chapters 10 and 13. AREC-ECON 535 Lec G 1

Visualize and interactively design weight matrices

splm: econometric analysis of spatial panel data

Spatial Analysis 1. Introduction

Lecture 5 Geostatistics

Spatial Autocorrelation (2) Spatial Weights

The Use of Spatial Weights Matrices and the Effect of Geometry and Geographical Scale

International Journal of Applied Economic Studies Vol. 4, Issue 5, October 2016 Available online at ISSN:

Spatial Econometrics The basics

Finding Hot Spots in ArcGIS Online: Minimizing the Subjectivity of Visual Analysis. Nicholas M. Giner Esri Parrish S.

Regional dynamics of economic performance in the EU: To what extent do spatial spillovers matter?

Spatial analysis. Spatial descriptive analysis. Spatial inferential analysis:

Exploratory Spatial Data Analysis (ESDA)

Spatial Relationships in Rural Land Markets with Emphasis on a Flexible. Weights Matrix

HUMAN CAPITAL CATEGORY INTERACTION PATTERN TO ECONOMIC GROWTH OF ASEAN MEMBER COUNTRIES IN 2015 BY USING GEODA GEO-INFORMATION TECHNOLOGY DATA

Spatial Econometrics

Applied Spatial Econometrics. Professor Bernard Fingleton Director of Research Department of Land Economy University of Cambridge

CHAPTER 3 APPLICATION OF MULTIVARIATE TECHNIQUE SPATIAL ANALYSIS ON RURAL POPULATION UNDER POVERTYLINE FROM OFFICIAL STATISTICS, THE WORLD BANK

THE SLX MODEL* JOURNAL OF REGIONAL SCIENCE, VOL. 55, NO. 3, 2015, pp

A spatial econometric production model, incorporating spill-over effects

Dr Arulsivanathan Naidoo Statistics South Africa 18 October 2017

Econometrics in a nutshell: Variation and Identification Linear Regression Model in STATA. Research Methods. Carlos Noton.

What s special about spatial data?

Financial Development and Economic Growth in Henan Province Based on Spatial Econometric Model

ECON 4160: Econometrics-Modelling and Systems Estimation Lecture 9: Multiple equation models II

Institutions and growth: Testing the spatial effect using weight matrix based on the institutional distance concept

Ordinary Least Squares Regression

Chapter 2 Linear Spatial Dependence Models for Cross-Section Data

Econometrics. Week 8. Fall Institute of Economic Studies Faculty of Social Sciences Charles University in Prague

Application of eigenvector-based spatial filtering approach to. a multinomial logit model for land use data

Tests forspatial Lag Dependence Based onmethodof Moments Estimation

Representation of Geographic Data

Lecture 2: Spatial Models

Nature of Spatial Data. Outline. Spatial Is Special

Using AMOEBA to Create a Spatial Weights Matrix and Identify Spatial Clusters, and a Comparison to Other Clustering Algorithms

Measuring The Benefits of Air Quality Improvement: A Spatial Hedonic Approach. Chong Won Kim, Tim Phipps, and Luc Anselin

The exact bias of S 2 in linear panel regressions with spatial autocorrelation SFB 823. Discussion Paper. Christoph Hanck, Walter Krämer

Evaluating sustainable transportation offers through housing price: a comparative analysis of Nantes urban and periurban/rural areas (France)

GMM Estimation of Spatial Error Autocorrelation with and without Heteroskedasticity

Ninth ARTNeT Capacity Building Workshop for Trade Research "Trade Flows and Trade Policy Analysis"

The OLS Estimation of a basic gravity model. Dr. Selim Raihan Executive Director, SANEM Professor, Department of Economics, University of Dhaka

GIS for ChEs Introduction to Geographic Information Systems

Introduction-Overview. Why use a GIS? What can a GIS do? Spatial (coordinate) data model Relational (tabular) data model

The Impacts of Climate Change on U.S. Agriculture: Accounting for Omitted Spatial Dependence in the Hedonic Approach

Agris on-line Papers in Economics and Informatics. Estimating Spatial Effects of Transport Infrastructure on Agricultural Output of Iran

TABLE I SUMMARY STATISTICS a

Spatial Effects and Externalities

iafor The International Academic Forum

Wooldridge, Introductory Econometrics, 4th ed. Chapter 15: Instrumental variables and two stage least squares

Dynamic Panels. Chapter Introduction Autoregressive Model

A SPATIAL CLIFF-ORD-TYPE MODEL WITH HETEROSKEDASTIC INNOVATIONS: SMALL AND LARGE SAMPLE RESULTS

Lecture 7: Spatial Econometric Modeling of Origin-Destination flows

ESE 502: Assignments 6 & 7

Modeling the Ecology of Urban Inequality in Space and Time

Model Specification and Spatial Interdependence

The SLX model: Extensions and the sensitivity of spatial spillovers to W

Working Paper No Introduction to Spatial Econometric Modelling. William Mitchell 1. April 2013

Working Paper Proceedings

PhD course: Spatial Health Econometrics. University of York, Monday 17 th July 2017

PRELIMINARY ANALYSIS OF SPATIAL REGIONAL GROWTH ELASTICITY OF POVERTY IN SUMATRA

Transcription:

Lecture 3: Spatial Analysis with Stata Paul A. Raschky, University of St Gallen, October 2017 1 / 41

Today s Lecture 1. Importing Spatial Data 2. Spatial Autocorrelation 2.1 Spatial Weight Matrix 3. Spatial Models 3.1 Identification 3.2 Spatial Models in Stata 3.3 Spatial Model Choice 4. Application 5. Mostly Pointless Spatial Econometrics? 6. Useful Stata commands 7. Zonal Statistics 2 / 41

Introduction Why? Stata includes a number of commands that allows you to import, manipulate and analyze spatial data. Sometimes, stata performs better than other GIS software (ArcGIS). For example with large data. Spatial models in stata. 3 / 41

1. Importing spatial data - Vector Stata cannot directly load shapefiles (.shp) shp2dta imports shapefiles and converts them to.dta Syntax: shp2dta using shp. filename, database( lename) coordinates( lename) [options] Example: eunuts2.dta: contains information from.dbf file, id, latitude (y) and longitude (x). eunuts2xy.dta: contains geometric information from.shp file. 4 / 41

1. Importing spatial data - Vector 5 / 41

1. Importing spatial data - Raster Stata can read raster in the ASCII format, with ras2dta ado (Muller 2005) Each cell becomes one row in Stata To export raster as the ASCII format, use Raster to ASCII 6 / 41

2. Spatial Autocorrelation Waldo Tobler s first law of geography: Everything is related to everything else, but near things are more related than distant things (Tobler 1970 p. 234) Spatial autocorrelation: Two or more objects that are spatially close tend to be more similar to each other with respect to a given attribute Y than are spatially distant objects. Spatial custering: Sub-areas of the study area where the attribute of interest Y takes higher than average values (hot spots) or lower than average values (cold spots) 7 / 41

2. Spatial Autocorrelation General Ord (1975) (based on work by Whittle (1954)) model for spatial autoregressive process: y i = ρ J W ij y j + ɛ i (1) j=1 J j=1 W ijy j : Spatial lag that represents a linear combination of values of y constructed from observations/regions that neighbor i. W ij : n n Spatial weight matrix ρ: Scalar of parameters that describe the strength of the spatial dependence. 8 / 41

2.1. Spatial Weight Matrix Example: 7 7 spatial weight matrix W using the first- order contiguity relations for the seven regions 9 / 41

2.1. Spatial Weight Matrix W Row sum normalized matrix of C. 10 / 41

2.1. Spatial Weight Matrix Spatial weighting matrices paramterize the spatial relationship between different units. Often, the building of W is an ad-hoc procedure of the researcher. Common criteria are: 1. Geographical: Distance functions: inverse, inverse with threshold Contiguity 2. Socio-economic: Similarity degree in economic dimensions, social networks, road networks. 3. Combinations between both criteria. 11 / 41

2.1. Spatial Weight Matrix Restricting the number of neighbors that affect any given place reduces dependence. Contiguity matrices only allow contiguous neighbors to affect each other. This structure naturally yields spatial-weighting matrices with limited dependence. Inverse-distance matrices sometimes allow for all places to affect each other. These matrices are normalized to limit dependence Sometimes places outside a given radius are specified to have zero affect, which naturally limits dependence 12 / 41

2.1. Spatial Weight Matrix Geographic distance and contiguity are exogenous, but often used as proxies for the true mechanism. Row standardization allows us to interpret w i j as the fraction of the overall spatial influence on country i from country j. This is practical but can lead to misspecified models (Kelejian & Prucha 2010; Neumayer and Plümper 2015). It imposes the restriction that if one unit has fewer ties to other units, then each tie is assumed to be more important. Scaling of the connectivity variable that enters into W does not necessarily match the relative relevance of j on i. Taking the log? Alternative approach: Kelejian and Prucha (2010). 13 / 41

2.1. Spatial Weight Matrix In Stata: Contiguity: spmat contiguity CONT using eunuts2xy, id( I D) norm(row) Inverse Distance Matrix (200km cut-off): spmat idistance IDISTVAL200 using eunuts2xy, id(i D) norm(row) vtruncate(1/200) 14 / 41

2.2 Global Spatial Statistics Morans I is a correlation coefficient that measures the overall spatial autocorrelation of your data set. In Stata: spatgsa lngdp, w(idistval200) moran geary two 15 / 41

3. Spatial Models y = ρwy + Xβ + ɛ (2) y is the N 1 vector of observations on the dependent variable X is the N k matrix of observations on the independent variables W and is N N spatial-weighting matrices that parameterize the distance between regions. ρ is a parameter scalars of spatial dependence. 16 / 41

3. Spatial Models 1. Spatial Error Model (SEM) y = Xβ + u (3) u = λwu + ɛ (4) Wu reflects spatial dependence in the disturbance process. 17 / 41

3. Spatial Models 2. Spatial Lag Model (SLM) Wy reflects spatial dependence in y. y = ρwy + Xβ + u (5) 18 / 41

3. Spatial Models 3. Spatial Durbin Model (SDM) y = ρwy + Xβ + γwx + ɛ (6) WX spatial lags of the explanatory variables 19 / 41

3.1. Spatial Models - Identification 1 y i = ρ J W ij y j + X i β + γ j=1 J W ij X j + ɛ i (7) j=1 Problem: y i and y j are determined simultaneously. Applying a standard ordinary least squares (OLS) estimator would yield inconsistent estimates and biased coefficients ρ. 20 / 41

3.1. Spatial Models - Identification 1 Potential solutions: Maximum Likelihood (ML) Estimator as proposed by Anselin (1988) Generalized method of moments instrumental variables (GMM2SLS) approach (Kelejian and Prucha (1998; Kelejian and Robinson 1993). Basic idea: Use of X j, W X j, or a combination of W X j with higher order lags W 2 X j, W 3 X j as (internal) instruments for y j 21 / 41

3.2. Spatial Models - In Stata 1. SDM: spreg ml lngdp inv pop w inv w pop, id(id) dlmat(idistval200) 2. SLM: spreg ml lngdp inv pop, id(id) dlmat(idistval200) 3. SEM: spreg ml lngdp inv pop, id(id) elmat(idistval200) For GMM2sls Replace ml by gs2sls 22 / 41

3.3. Spatial Models - Choice y i = ρ Elmhorst (2010) J W ij y j + X i β + γ j=1 J W ij X j + ɛ i (8) 1. Estimate equation (11) by using OLS and setting ρ = 0 γ = 0. j=1 2. Lagrange multiplier (LM) tests if the spatial lag model or spatial error model is more appropriate (Anselin 1988). 3. If the nonspatial model is rejected in favor of the spatial autoregressive model or spatial error model or both, the spatial Durbin model should be taken. 23 / 41

4. Application - Borsky & Raschky (2014) International environmental agreement (IEA)are a popular tool to overcome the free-rider problem associated with global environmental problems. However, the voluntary character of many IEAs prevents neither free-riding from nonsignatory countries. Interestingly, numerous IEAs are ratified each year, although their benefits are nonrival and nonexcludable. Possible explanation: Intergovernmental interaction among the signatory countries. 24 / 41

4. Application - Borsky & Raschky (2014) Cross-sectional data sets to measure signatory countries compliance with the obligations of Article 7 of the 1995 UN Code of Conduct for Responsible Fisheries (CoC) Data from 53 signatory countries: Compliance effort, marine protected areas, marine biodiversity. GDP, Costs, Inst. Quality, Competition, Env. Performance, Fish Export. 25 / 41

4. Application - Borsky & Raschky (2014) Spatial Weighting matrix 1 - Inverse Geographic Distance The degree of (non)compliance is more easily observed for countries that are geographically closer to each other. Intergovernmental interdependence is defined by the degree of interaction due to economic transactions and political relations, which decrease in distance. We assume each country to be affected by all other countries in our sample, where closer countries are stronger weighted no distance cut-off Row normalized. 26 / 41

4. Application - Borsky & Raschky (2014) Spatial Weighting matrix 2 - Political Distance Based on Rose and Spiegel (2009) Mutual involvement in 443 IEAs of each country pair as a distance measure. 27 / 41

4. Application - Borsky & Raschky (2014) Empirical Strategy: Following Elmhorst (2010) and Anselin (1988) we use a SDM. Estimate the model using ML (and GMM2SLS in robustness exercise). 28 / 41

4. Application - Borsky & Raschky (2014) Main Results: Following Elmhorst (2010) and Anselin (1988) we use a SDM. Estimate the model using ML (and GMM2SLS in robustness exercise). 29 / 41

4. Application - Borsky & Raschky (2014) Political Distance: GMM2SLS: 30 / 41

4. Application - Borsky & Raschky (2014) Results: Intergovernmental interaction has a systematic impact on a countrys level of compliance. Other countries compliance behavior acts as a strategic complement, and the effect decreases in distance. Indirect spatial spillover effects (w LeSage and Pace 2009): Variables that improve the allocation of property rights in one country seem to generate spatial spillover effects on compliance effort. 31 / 41

5. Mostly Pointless Spatial Econometrics? Gibbons & Overman (2012) (in a nutshell) Estimates of spatial lag, ρ, are endogenous. Both ML and GMM2SLS do not adequately solve this problem. Proposed Solutions: Natural experiments: Redding and Sturm (2008): Reunification changes W. Using exogneous IVs: Luechinger (2009): Pollution and wind directions Discontinuities: Greenstone et al. (2010): Plant relocations and comparing first with second ranked preferences. 32 / 41

6. Other useful commands Spatial panel models tsset data first xsmle lngsp pop, wmat(idistval200) model(sar) 33 / 41

6. Other useful commands Spatial errors in stata Fetzer (2015): reg2hdfespatial Hsiang (2010): ols spatial HAC 34 / 41

6. Other useful commands Distance between points in stata Vincenty Calculating geodesic distances between a pair of points on the surface of the Earth. Basic Syntax: vincenty lat1 lon1 lat2 lon2 inkm 35 / 41

6. Other useful commands Spatial Join in stata geoinpoly geoinpoly Y X using eunuts2xy.dta merge m:1 ID using eunuts2.dta 36 / 41

7. Zonal Statistics Zonal Statistics combines information from vector and raster data to calculate summary statistics of raster data value within each polygon Mean / Standard deviation Min / Max / Range Sum Count 37 / 41

7. Zonal Statistics Polygon examples: Countries Subnational regions Ethnic homelands FAO zones Grid cells (this lecture) Raster data examples: Population Temperature Agricultural suitability Elevation Land use Nighttime light 38 / 41

7. Zonal Statistics Application in Economics Nighttime lights at the Country (Henderson et al. 2012) ADM1/ADM2 Level (Hodler & Raschky 2014) City boundaries (Soteygard 2016) Grid Level (Henderson et al. 2017) Ethnic homelands (Michalopoulos & Papaioannou 2013 / 2014, Alesina et al. 2016) 39 / 41

7. Zonal Statistics Application in Economics Temperature/Drought ADM1/ADM2 Level (Hodler & Raschky 2014) Grid Level (Dell et al. 2017) Ethnic homelands (Michalopoulos & Papaioannou 2013 / 2014, Alesina et al. 2016) Crop Cover Grid Level (Harari & La Ferrera 2017) Elevation & Slope Duflo & Pande (2007) 40 / 41

7. Zonal Statistics Exercise 3 - Zonal Statistics 41 / 41