Spatial Econometrics Lecture 1: The notion of spatial modelling. Visualisation of spatial data in R (1) Spatial Econometrics 1 / 30
Contents 1 Why spatial modelling? Space vs ties between units Applications of spatial modelling 2 Spatial data structure Spatial order vs temporal order Types of spatial inuences 3 Software and data Software Sources of spatial data and literature (1) Spatial Econometrics 2 / 30
Plan prezentacji 1 Why spatial modelling? 2 Spatial data structure 3 Software and data (1) Spatial Econometrics 3 / 30
Space vs ties between units Paradigms Tobler's law (1970): Everything is related to everything else, but near things are more related than distant things. Tobler's second law (2004): The word near may have a lot of meanings. In other words, Beck (2006): There is more to space than geography. (1) Spatial Econometrics 4 / 30
Space vs ties between units Paradigms Tobler's law (1970): Everything is related to everything else, but near things are more related than distant things. Tobler's second law (2004): The word near may have a lot of meanings. In other words, Beck (2006): There is more to space than geography. (1) Spatial Econometrics 4 / 30
Space vs ties between units Paradigms Tobler's law (1970): Everything is related to everything else, but near things are more related than distant things. Tobler's second law (2004): The word near may have a lot of meanings. In other words, Beck (2006): There is more to space than geography. (1) Spatial Econometrics 4 / 30
Space vs ties between units Case 1: neighbourhood ties between counties in USA (1) Spatial Econometrics 5 / 30
Space vs ties between units Case 2: following 'tweets' among French members of parliament (1) Spatial Econometrics 6 / 30
Space vs ties between units How are spatial ties generated? Units impact on one another e.g. spatial diusion: cases of u in a given district But also... Level of measurement not suitable for the investigated phenomenon (np. regional aggregates instead of micro-data) Common measurement errors (e.g. community-level data prepared under dierent guidelines of regional statistical oces) Spatial aggregation level (1) Spatial Econometrics 7 / 30
Space vs ties between units Spatial aggregation level (1) On average, 0 neighbours of the same colour. (1) Spatial Econometrics 8 / 30
Space vs ties between units Spatial aggregation level (2) On average, 2.67 neighbours of the same colour. (1) Spatial Econometrics 9 / 30
Applications of spatial modelling Applications of spatial modelling (1) Applications: traditional: maps of ties between states or regions, e.g. in trade or foreign investment regional analyses: ties between relatively small units (poviats, communities), observable via e.g. unemployment rates or local government nance business analyses: big data from GIS systems (e.g. modelling the attractiveness of business locations, optimisation of sales network, managing logistics) (1) Spatial Econometrics 10 / 30
Applications of spatial modelling Applications of spatial modelling (1) Applications: traditional: maps of ties between states or regions, e.g. in trade or foreign investment regional analyses: ties between relatively small units (poviats, communities), observable via e.g. unemployment rates or local government nance business analyses: big data from GIS systems (e.g. modelling the attractiveness of business locations, optimisation of sales network, managing logistics) (1) Spatial Econometrics 10 / 30
Applications of spatial modelling Applications of spatial modelling (1) Applications: traditional: maps of ties between states or regions, e.g. in trade or foreign investment regional analyses: ties between relatively small units (poviats, communities), observable via e.g. unemployment rates or local government nance business analyses: big data from GIS systems (e.g. modelling the attractiveness of business locations, optimisation of sales network, managing logistics) (1) Spatial Econometrics 10 / 30
Applications of spatial modelling Applications of spatial modelling (2) security policy (alliances, wars, military interventions...) protection of environment (air pollution, water contagion...) international interdependence of policies (copying legislation patterns...) political science (constituencies and electoral systems...) epidemiology (spreading of epidemics...) economic diusion (local labour markets...) More: Haegerstrand (1967), Manski (2000), Simmons et al. (2005) (1) Spatial Econometrics 11 / 30
Plan prezentacji 1 Why spatial modelling? 2 Spatial data structure 3 Software and data (1) Spatial Econometrics 12 / 30
Spatial order vs temporal order Temporal order For time series, we use the notion of serial correlation. It makes sense when... observations are aligned in a linear order (1-D) the frequency of the series is set, i.e. identically long reporting periods (or intervals between measurement moments) Source of information about the order: the records are sorted or there is an explicit timestamp. (1) Spatial Econometrics 13 / 30
Spatial order vs temporal order Spatial order The temporal, 1-D order is not the only possible one for our data. observations may be attributed to areas or points on a surface or sphere (2-D) implications of such an order are more dicult to manage (2-D rather than 1-D), but ignoring this may lead to the same problems as temporal serial correlation (1) Spatial Econometrics 14 / 30
Spatial order vs temporal order Source of information about the spatial order In spatial econometrics, the order is described by a spatial weight matrix (see: next lecture). It might be based on: manual imputation of neighbourhood relationships (tedious) e.g. USA linked to Mexico, Canada linked to USA, Mexico not linked to Canada distance matrix between units in space how to generate it? how exactly to measure the distance? graphical 2-D representation of space, i.e. a map, from which neighbourhood relationships or distances can be derived (1) Spatial Econometrics 15 / 30
Spatial order vs temporal order Source of information about the spatial order In spatial econometrics, the order is described by a spatial weight matrix (see: next lecture). It might be based on: manual imputation of neighbourhood relationships (tedious) e.g. USA linked to Mexico, Canada linked to USA, Mexico not linked to Canada distance matrix between units in space how to generate it? how exactly to measure the distance? graphical 2-D representation of space, i.e. a map, from which neighbourhood relationships or distances can be derived (1) Spatial Econometrics 15 / 30
Spatial order vs temporal order Source of information about the spatial order In spatial econometrics, the order is described by a spatial weight matrix (see: next lecture). It might be based on: manual imputation of neighbourhood relationships (tedious) e.g. USA linked to Mexico, Canada linked to USA, Mexico not linked to Canada distance matrix between units in space how to generate it? how exactly to measure the distance? graphical 2-D representation of space, i.e. a map, from which neighbourhood relationships or distances can be derived (1) Spatial Econometrics 15 / 30
Spatial order vs temporal order Source of information about the spatial order In spatial econometrics, the order is described by a spatial weight matrix (see: next lecture). It might be based on: manual imputation of neighbourhood relationships (tedious) e.g. USA linked to Mexico, Canada linked to USA, Mexico not linked to Canada distance matrix between units in space how to generate it? how exactly to measure the distance? graphical 2-D representation of space, i.e. a map, from which neighbourhood relationships or distances can be derived (1) Spatial Econometrics 15 / 30
Spatial order vs temporal order Econometric implications of spatial linkages Observations are not independent! In this model: y i = β 0 + β 1 x i + ε i it is not any more true that ε i i.i.d. (independent, identically distributed). The consequence is, at best, ineciency of OLS estimation (like in the case of temporal autocorrelation). The big dierence: while the temporal impact runs in one direction only (past present), spatial autocorrelation can run in both directions (our region neighbourhood region other regions our region). Here, the implications can be more serious and involve inconsistency and bias in OLS estimation (like in simultaneous equations models). (1) Spatial Econometrics 16 / 30
Spatial order vs temporal order Econometric implications of spatial linkages Observations are not independent! In this model: y i = β 0 + β 1 x i + ε i it is not any more true that ε i i.i.d. (independent, identically distributed). The consequence is, at best, ineciency of OLS estimation (like in the case of temporal autocorrelation). The big dierence: while the temporal impact runs in one direction only (past present), spatial autocorrelation can run in both directions (our region neighbourhood region other regions our region). Here, the implications can be more serious and involve inconsistency and bias in OLS estimation (like in simultaneous equations models). (1) Spatial Econometrics 16 / 30
Types of spatial inuences Main types of spatial inuences......will be presented by world-class experts in neighbourhood topics: (1) Spatial Econometrics 17 / 30
Types of spatial inuences Main types of spatial inuences (1) (1) Spatial Econometrics 18 / 30
Types of spatial inuences Main types of spatial inuences (2) (1) Spatial Econometrics 19 / 30
Types of spatial inuences Main types of spatial inuences (3) (1) Spatial Econometrics 20 / 30
Types of spatial inuences Main types of spatial inuences (4) (1) Spatial Econometrics 21 / 30
Types of spatial inuences Types of spatial inuences: additional remarks Hasty conclusions of spatial interdependence should be avoided (situation 3), unless other cases have reasonably been excluded. Spatial interdepencence (situation 3) is relatively unlikely when modelling spatial aggregates. Situations 1 and 2 more likely in that case. (1) Spatial Econometrics 22 / 30
Plan prezentacji 1 Why spatial modelling? 2 Spatial data structure 3 Software and data (1) Spatial Econometrics 23 / 30
Software Software A small number of econometric packages oers tools for spatial modelling. The leading ones: Matlab, Stata, R. The materials accompanying this lecture use R (via RStudio). Installing package spdep install.packages(spdep) library(spdep) Another useful package is rgdal, and for visualising data on map additionally maptools, RColorBrewer i classint. Lista wszystkich pakietów R do analizy danych przestrzennych na CRAN. (1) Spatial Econometrics 24 / 30
Sources of spatial data and literature Example Our task is to plot a map illustrating the unemployment rate from the le BDL_dane.xls for poviats. This sample covers Poland in 2014 and comes from Local Data Bank by GUS (Central Statistical Oce in Poland). To do this, we must merge the unemployment data with cartographic data. This is how we impose a spatial structure on the data.. Will also be useful in modelling in the following lectures.. Solution with comments in the accompanying R code. (1) Spatial Econometrics 25 / 30
Sources of spatial data and literature Example nal eect of the code (1) Spatial Econometrics 26 / 30
Sources of spatial data and literature Sources of cartographic data GADM administrative divisions in almost all countries of the world CODGiK more accurate maps by Polish Centralny O±rodek Dokumentacji Geodezyjnej i Kartogracznej (surveyor authority) Eurostat maps of EU states in NUTS nomenclature from NUTS0 to NUTS3 (in Poland NUTS2: voivodships, NUTS4: poviats) package cshapes in R ready-made world map (current and historical after 1945) with additional functions for international spatial analyses and many more... (1) Spatial Econometrics 27 / 30
Sources of spatial data and literature Functions in use readogr imports the map and uses the following les: shp shapes of the regions additionally shx and dbf prj technical details related to the projection of geosphere on the plane that was used to generate the shp le sptransform allows to transform all the geocoding information into longitude and latitude in degrees (required by a number of R packages) brewer.pal, classintervals useful to transform the visualised variable into colours (1) Spatial Econometrics 28 / 30
Sources of spatial data and literature Homework 1 Using the Eurostat database and R, please illustrate the regional variation in a selected variable, in a European country of Your choice and a chosen time period (this should not be the unemployment rate, nor Poland, but still a relatively large country). (1) Spatial Econometrics 29 / 30
Sources of spatial data and literature Literature Compulsory: Other: Arbia G., A Primer for Spatial Econometrics with Applications in R, 2014, Palgrave Macmillan. Anselin L., Spatial Econometrics, ch. 29 in: T.C. Mills and K. Patterson (Eds.), Palgrave Handbook of Econometrics: Volume 1, Econometric Theory. Basingstoke, Palgrave Macmillan, 2006, pp. 901-969. Le Sage J. and Pace R.K., Introduction to Spatial Econometrics, 2009, Chapman and Hall/CRC. (1) Spatial Econometrics 30 / 30