This paper compares the implementations of estimation methods for spatial econometrics across different software packages: MATLAB, Stata, Python (PySAL), and R (spdep, sphet, McSpatial). The comparison is based on a cross-sectional US county dataset from Drukker, Prucha, and Raciborski (2011c). The study focuses on generalized method of moments (GMM) and maximum likelihood (ML) estimation techniques, and examines the consistency of results across different implementations. The authors also compare the calculation of emanating effects (impacts) and other spatial econometric measures.
The study uses a unified R script to prepare data for export to different software packages and to run the models. The results are then compared in tabular form, with attention to differences in output due to variations in implementation. The analysis shows that all four software packages produce identical results for the OLS estimation of the dataset, confirming that they handle the same data consistently. However, differences in the implementation of GMM and ML methods are observed, particularly in the choice of numerical optimization techniques and the handling of spatial weights.
The paper also discusses the differences in the notation used for spatial autoregressive parameters, with some software packages using different conventions. The study highlights the importance of correctly specifying spatial weights and the impact of different weighting schemes on the results. The authors also note that the spatial dependence in the dataset may have been introduced using minmax-normalized weights, which can lead to stronger spatial autocorrelation compared to row-standardized weights.
The paper concludes that while the results for OLS estimation are consistent across all software packages, differences in the implementation of GMM and ML methods may affect the results. The study emphasizes the importance of understanding the underlying assumptions and implementation details of each software package when conducting spatial econometric analysis. The authors also note that the results for the spatial lag model are consistent across different implementations, but differences in the calculation of standard errors and the handling of spatial weights may affect the interpretation of the results.This paper compares the implementations of estimation methods for spatial econometrics across different software packages: MATLAB, Stata, Python (PySAL), and R (spdep, sphet, McSpatial). The comparison is based on a cross-sectional US county dataset from Drukker, Prucha, and Raciborski (2011c). The study focuses on generalized method of moments (GMM) and maximum likelihood (ML) estimation techniques, and examines the consistency of results across different implementations. The authors also compare the calculation of emanating effects (impacts) and other spatial econometric measures.
The study uses a unified R script to prepare data for export to different software packages and to run the models. The results are then compared in tabular form, with attention to differences in output due to variations in implementation. The analysis shows that all four software packages produce identical results for the OLS estimation of the dataset, confirming that they handle the same data consistently. However, differences in the implementation of GMM and ML methods are observed, particularly in the choice of numerical optimization techniques and the handling of spatial weights.
The paper also discusses the differences in the notation used for spatial autoregressive parameters, with some software packages using different conventions. The study highlights the importance of correctly specifying spatial weights and the impact of different weighting schemes on the results. The authors also note that the spatial dependence in the dataset may have been introduced using minmax-normalized weights, which can lead to stronger spatial autocorrelation compared to row-standardized weights.
The paper concludes that while the results for OLS estimation are consistent across all software packages, differences in the implementation of GMM and ML methods may affect the results. The study emphasizes the importance of understanding the underlying assumptions and implementation details of each software package when conducting spatial econometric analysis. The authors also note that the results for the spatial lag model are consistent across different implementations, but differences in the calculation of standard errors and the handling of spatial weights may affect the interpretation of the results.