Downloads

Click on (+) for more information and downloads

Code Textbook Spatial Econometrics: From Cross-sectional Data to Spatial Panels 2014

Elhorst J.P. (2014) Spatial Econometrics: From Cross-sectional Data to Spatial Panels. Springer: Berlin New York Dordrecht London.
http://www.springer.com/economics/regional+science/book/978-3-642-40339-2

Section 2.5

Download the Matlab-file Statregion to determine the stationariy region of a second-order spatial lag model or second-order polynomial in two spatial weights matrices. Code for third-order spatial lag model is also provided. Reference: Elhorst J.P., Lacombe D.J., Piras G. (2012) On Model Specification and Parameter Space Definitions in Higher Order Spatial Econometrics Models. Regional Science & Urban Economics 42: 211-220.

Section 2.8

Download cross-sectional spatial econometric models (demo tables 2.1 and 2.2) to reproduce the results reported in Tables 2.1 and 2.2. The demo contains files to estimate all spatial econometric models based on an exact calculation of the Jacobian term in the log_likelihood function. Supporting files to print the results, to calculate (robust) LM-test statistics and to calculate direct and indirect effects are also included.

Section 3.6.2

Download spatial panel econometric models (demo tables 3.2-3.4) to reproduce the results reported in Tables 3.2, 3.3 and 3.4. The demo contains files to estimate (robust) LM-statistics, test-statistics for the inclusion of spatial and time-period fixed effects, commands to estimate spatial econometric models with different combinations of spatial interaction effects, and a file to calculate direct and indirect effects.

Section 3.8

Download the hierarchical linear model (demo_file) to estimate multi_level model with heteroskedastic disturbances, spatial autocorrelation and endogenous regressors. Reference: Elhorst J.P., A. S. Zeilstra (2007) Labour force participation rates at the regional and national levels of the European Union: An integrated analysis. Papers in Regional Science 86: 525-549.

Section 3.9

Download the Matlab-file les_sar_cost differences and a rar-file with additional Matlab-files needed to run this file to estimate a Linear Expenditure System with endogenous interaction effects and cost differences among jurisdictions based on cross-section data. Reference: Allers M.A., Elhorst J.P. (2011) A simultaneous equations model of fiscal policy interactions. Journal of Regional Science. 51: 271-291.

Section 4.6

Download the Matlab_file dynamic spatial panel data model to estimate a dynamic spatial panel data model, to test for non-stability, to select W-matrix, and to impose spatial coïntegration. Data set is included too. You may also need a briefly extended version of sar_jhai.m for caclulating the direct and indirect effects estimates. Reference: The Impact of Interaction Effects among Neighbouring Countries on Financial Liberalization and Reform: Elhorst J.P., Zandberg E., Haan J. de. (2013) A Dynamic Spatial Panel Data Approach. Spatial Economic Analysis 8: 293-313.

Section 4.7

demo to disentangle short-term and long-term direct and indirect effects and to reproduce the results reported in Table 4.3.

Extended Code of Jihai Yu to estimate dynamic spatial panel data models

Jihai Yu was so kind to make his code available to estimate a dynamic spatial panel data model by maximum likelihood. To determine direct and indirect effects, both in the short and in the long term, I extended the code with a few lines. These extended files can be downloaded here: sar_jihai, sar_jihai_time, f_sar_jihai, f2_sar_jhai, and f2_sar_jhai_time.

Data to estimate spatial econometric models (cigarette demand, crime)

Download the demo data set on cigarette demand taken from Baltagi’s book “Econometric Analysis of Panel Data” (2001). This data set consists of 46 spatial units over 30 years. Some demo files use a data set of only six years, which can be downloaded here. Download the corresponding spatial weight matrix of 46 U.S. states.

Download the demo data set on crime rates taken from Anselin’s book “Spatial Econometrics: Methods and Models” (1988). This data set consists of 49 spatial units. Download the corresponding spatial weight matrix of 49 neighborhoods .

Recently published open access papers

Jing Z., Elhorst J.P., Jacobs J., Haan J. de (2017) The Propagation of Financial Turbulence: Interdependence, Spillovers, and Direct and Indirect Effects, Empirical Economics: https://link.springer.com/article/10.1007/s00181-017-1249-y

Firmino Costa da Silva D. , Elhorst J.P., Neto Silveira R.d.M. (2017), Urban and Rural Population Growth in a Spatial Panel of Municipalities, Regional Studies 51(6): 894-908: http://www.tandfonline.com/doi/full/10.1080/00343404.2016.1144922

Halleck Vega S., Elhorst J.P. (2017) Regional labor force participation across the EU:
A time-space recursive modeling approach with endogenous regressors. Spatial Economic Analysis, 12(2): 422-439: http://www.tandfonline.com/doi/full/10.1080/17421772.2016.1224374

Code Journal of Peace Research Paper 2017

Code Regional Studies Paper 2017 (SDM vs SDEM)

Paper: http://www.tandfonline.com/doi/full/10.1080/00343404.2016.1144922

Similar code is used in Journal of Peace Research paper and can be downloaded here: https://spatial-panels.com/wp-content/uploads/2017/11/Matlab-files-JPR.zip

Book chapter Spatial Panel Data Analysis 2017 in Encyclopedia of GIS, 2nd edition, Working Paper Version

Paper: https://link.springer.com/referenceworkentry/10.1007/978-3-319-17885-1_1641

Working Paper Version: https://spatial-panels.com/wp-content/uploads/2017/07/Elhorst-Spatial-Panel-Data-Analysis-Encyclopedia-GIS-2nd-ed_Working-Paper-Version.pdf

Reference: Elhorst, J.P. (2017) Spatial Panel Data Analysis. In: Shekhar S., Xiong H., Zhou X. (Eds.) Encyclopedia of GIS, 2nd edition, pp. 2050-2058. Springer International Publishing, Cham, Switzerland.

English translation Papeles de Economía Española 2017 paper (Extensions SLX model)

Paper: https://www.funcas.es/Publicaciones/Detalle.aspx?IdArt=23062

Title in Spanish: El modelo SLX: ampliación de la forma general, y sensibilidad de los desbordamientos espaciales a la especificación de la W.

English translation: https://spatial-panels.com/wp-content/uploads/2017/07/PEE_2017-Elhorst-Halleck-Vega-English-Translation.pdf

Code book chapter General Nesting Spatial Models 2017 plus Working Paper Version

Paper: http://www.emeraldinsight.com/doi/abs/10.1108/S0731-905320160000037016

Working paper: https://spatial-panels.com/wp-content/uploads/2017/07/HGNM_Advances-in-Econometrics-Vol37_Burridge-Elhost-Zigova-Working-Paper-Version.pdf

Demo GNS and additional files to run GNS model: sac_panel_FE, f_sacpanel, and f2_sacpanel.

Reference: Burridge P., Elhorst J.P., Zigova K. (2017) Group Interaction in Research and the Use of General Nesting Spatial Models. In: Baltagi B.H., LeSage J.P., Pace R.K. (eds.) Spatial Econometrics: Qualitative and Limited Dependent Variables (Advances in Econometrics, Volume 37), pp.223 – 258. Bingley (UK), Emerald Group Publishing Limited.

Code Journal of Applied Econometrics paper 2017 (Spatial probit)

Paper: http://onlinelibrary.wiley.com/doi/10.1002/jae.2505/full

Data and Matlab code used in this paper can be found at the Web site: http://qed.econ.queensu.ca/jae/datasets/elhorst001/

Code Journal of Regional Science & Urban Economics Paper 2016 (Simultaneous DSPD model + Common Factors)

Download the Matlab_file and data sets Unemployment and BCNL to reproduce the results of Bailey et al.’s two step approach and our proposed simultaneous approach. Reference: Halleck Vega S., Elhorst J.P. (2016) A regional unemployment model simultaneously accounting for serial dynamics, spatial dependence and common factors. Regional Science and Urban Economics 60 (2016) 85-95.

Code Journal of Regional Science Paper 2015 (SLX model)

Download the Matlab_files and data sets SLX to reproduce the results in Tables 2, 3 and 4 of the paper. Reference: Halleck Vega, S., Elhorst J.P. (2015), The SLX model. Journal of Regional Science 55(3): 339-363.

Code International Regional Science Review paper 2014 (Matlab Software for Spatial Panels)

Elhorst J.P. (2014) Matlab Software for Spatial Panels. International Regional Science Review 37: 385-401. DOI: 10.1177/0160017612452429.

Download demoLMsarsem_panel to test for a spatially lagged dependent variable or spatial autocorrelation in a spatial panel data model using (robust) LM tests based on spatial panel data. You may also need demean.

Download demopanelscompare of the different panel data models, and to test for the joint significance of spatial fixed or random effects as well as to compare spatial fixed and random effects models using Hausman’s specification test.

Download a Notepad file Matlab-paper-results which gives the results when running the file demopanelscompare.

You may also need sar_parse, sar_eigs, sar_lndet and hessian developed by J.LeSage.

Download sem_panel_FE, f_sempanel, f2_sempanel to estimate static panel data model (N regions*T time periods) with spatial error autocorrelation and fixed effects: 0=pooled model without fixed effects (default, x may contain an intercept), 1=spatial fixed effects, 2=time period fixed effects, 3=spatial and time period fixed effects.

You may also need sem_parse, sem_eigs, sem_lndet and hessian developed by J.LeSage.

Download sar_panel_RE, f_resar, f2_resar to estimate static panel data model (N regions*T time periods) with a spatially lagged dependent variable and spatial random effects.

Download sem_panel_RE, f_respat, f2_respat to estimate static panel data model (N regions*T time periods) with spatial error autocorrelation and spatial random effects.

Download file to print the output of these panel data models.

Code Book Chapter Spatial panel models in Handbook of Regional Science 2013

demo to disentangle short-term and long-term direct and indirect effects and to reproduce the results reported in Table 82.2.

Code Spatial Economic Analysis Paper 2013

Download the Matlab_file dynamic spatial panel data model to estimate a dynamic spatial panel data model, to test for non-stability, to select W-matrix, and to impose spatial coïntegration. Data set is included too. You may also need a briefly extended version of sar_jhai.m for caclulating the direct and indirect effects estimates. Reference: The Impact of Interaction Effects among Neighbouring Countries on Financial Liberalization and Reform: Elhorst J.P., Zandberg E., Haan J. de. (2013) A Dynamic Spatial Panel Data Approach. Spatial Economic Analysis 8: 293-313.

Code Regional Science and Urban Economics Paper 2012

Download the Matlab-file Statregion to determine the stationariy region of a second-order spatial lag model or second-order polynomial in two spatial weights matrices. Code for third-order spatial lag model is also provided. Reference: Elhorst J.P., Lacombe D.J., Piras G. (2012) On Model Specification and Parameter Space Definitions in Higher Order Spatial Econometrics Models. Regional Science & Urban Economics 42: 211-220.

Code Journal of Regional Science paper 2011

Download the Matlab-file les_sar_cost differences and a rar-file with additional Matlab-files needed to run this file to estimate a Linear Expenditure System with endogenous interaction effects and cost differences among jurisdictions based on cross-section data. Reference: Allers M.A., Elhorst J.P. (2011) A simultaneous equations model of fiscal policy interactions. Journal of Regional Science. 51: 271-291.

Code Book Chapter Spatial Panel Data Models 2010

Download sar_panel_FE, f_sarpanel, f2_sarpanel to estimate static panel data model (N regions*T time periods) with a spatially lagged dependent variable and fixed effects: 0=pooled model without fixed effects (default, x may contain an intercept), 1=spatial fixed effects, 2=time period fixed effects, 3=spatial and time period fixed effects. The file direct_indirect_effects_estimates is needed to calculate the direct and indirect effects estimates of the explanatory variables. Alternatively, you may use panel_effects_sar.m and/or panel_effects_sdm.m.

You may also need sar_parse, sar_eigs, sar_lndet and hessian developed by J.LeSage.

Download sem_panel_FE, f_sempanel, f2_sempanel to estimate static panel data model (N regions*T time periods) with spatial error autocorrelation and fixed effects: 0=pooled model without fixed effects (default, x may contain an intercept), 1=spatial fixed effects, 2=time period fixed effects, 3=spatial and time period fixed effects.

You may also need sem_parse, sem_eigs, sem_lndet and hessian developed by J.LeSage.

Download sar_panel_RE, f_resar, f2_resar to estimate static panel data model (N regions*T time periods) with a spatially lagged dependent variable and spatial random effects.

Download sem_panel_RE, f_respat, f2_respat to estimate static panel data model (N regions*T time periods) with spatial error autocorrelation and spatial random effects.

Download file to print the output of these panel data models.

Code Regional Science & Urban Economics paper 2010

Download Matlab-file to estimate dynamic spatial panel data model here.  

Code Journal of Regional Science paper 2009 (two-regime model)

Download sarregime_panel, f_sar2_panel, f2_sar2_panel, prt-spreg and demo-file to estimate spatial panel data model (N regions*T time periods) with two regimes (two spatial lags with different coefficients) and with spatial and/or time-period fixed effects. Reference: Elhorst J.P., Fréret S. (2009) Evidence of political yardstick competition in France using a two-regime spatial Durbin model with fixed effects. Journal of Regional Science 49: 931-951.

Overview of papers on high speed railway

Elhorst J.P., Oosterhaven J. (2008) Integral cost-benefit analysis of maglev rail projects under market imperfections. Journal of Transport and Land Use 1: 65-87: https://www.jtlu.org/index.php/jtlu/article/view/12

Elhorst J.P., Oosterhaven J. (2006) Forecasting the impact of transport improvements on commuting and residential choice. Journal of Geographical Systems 8: 39-59: https://link.springer.com/article/10.1007/s10109-005-0015-4

Oosterhaven J., Elhorst J.P. (2008) Modelling the economy, transport and environment triangle, with an application to Dutch Maglev projects. In: Jensen-Butler C., Sloth B., Larsen M.M., Madsen B., Nielsen O.A. (eds.) Road pricing, the economy and the environment, pp. 207-227. Springer-Verlag, Berlin: https://spatial-panels.com/wp-content/uploads/2017/11/TRIP-Oosterhaven-Elhorst-2008-In-Jensen-Butler-C-Sloth-B-Larsen-MM-Madsen-B-Nielsen-OA-eds-Road-pricing-the-economy-and-the-environment-pp-207-227-Springer-Verlag-Berlin.pdf

Oosterhaven J., Elhorst J.P. (2003) Indirect economic benefits of transport infrastructure investments. In: W. Dullaert, B.A.M. Jourquin, J.B. Polak (eds.) Across the border; Building upon a quarter century of transport research in the Benelux, pp. 143-162. De Boeck, Antwerpen: https://spatial-panels.com/wp-content/uploads/2017/11/BIVEC-2003-Oosterhaven-Elhorst-In-W-Dullaert-BAM-Jourquin-JB-Polak-eds-Across-the-border-Building-upon-a-quarter-century-of-transport-research-in-the-Benelux-pp-143-162-De-Boeck-Antwerpen.pdf

Code Economics Letters paper 2008

Download serialspatial, f_serialspat, f2_serialspat and demo-file to estimate pooled regression model (N regions*T time periods) with serial and spatial error correlation. Reference: Elhorst J.P. (2008) Serial and spatial autocorrelation. Economics Letters 100: 422-424.http://dx.doi.org/10.1016/j.econlet.2008.03.009.

Code Papers in Regional Science paper 2007 (multilevel)

Download the hierarchical linear model (demo_file) to estimate multi_level model with heteroskedastic disturbances, spatial autocorrelation and endogenous regressors. Reference: Elhorst J.P., A. S. Zeilstra (2007) Labour force participation rates at the regional and national levels of the European Union: An integrated analysis. Papers in Regional Science 86: 525-549.

Code International Tax and Public Finance paper 2005

Download matlab-file to estimate spatial econometric model with two regimes in the spatially lagged dependent variable (Note: Use this file for cross-section data, for spatial panel data see Journal of Regional Science paper 2009). You also need f_sarpaul, f2_sarpaul, f_sarpar2 and f2_sarpar2. Reference: Allers M.A., Elhorst J.P. (2005) Tax mimicking and yardstick competition among local governments in the Netherlands. International Tax and Public Finance 12: 493-513.

Code Geographical Analysis paper 2005

Download matlab-file to estimate dynamic panel data model (N regions*T time periods) including a serially lagged dependent variable, regional fixed effects and spatial error autocorrelation. Reference: Elhorst J.P. (2005) Unconditional maximum likelihood estimation of linear and log-linear dynamic models for spatial panels. Geographical Analysis 37: 85-106.

General info

Contact

Prof. dr. J.P. (Paul) Elhorst
Professor of Spatial Econometrics
University of Groningen
Phone: +31(0)50-3633893
E-mail: j.p.elhorst@rug.nl