Pspatreg: R Package for Semiparametric Spatial Autoregressive Models
Abstract
:1. Introduction
2. Semiparametric Spatial Econometric Models: A Review
P-Spline Models for Spatial and Spatiotemporal Data
- PS model
- PS-SLX model
- PS-SAR model (PS-spatial autorregresive model)
- PS-SEM model (PS-spatial error model)
- PS-SDM model (PS-spatial Durbin model)
- PS-SDEM model (PS-spatial Durbin error model)
- PS-SARAR model
- 1.
- 2.
- Use SAP (Separation of Anisotropic Penalties) algorithm [23] to obtain REML (or ML) estimates of the variance components, random effects, and parameters of the mixed model. This algorithm is high-speed and it does not require numerical optimization.
- 3.
- Conditioning on previous estimates, use numerical optimization to estimate spatial parameters, i.e., and/or , associated to spatial lags of the dependent variable and/or the model’s noise. We use the bobyqa() optimizer implemented in minqa package [24].
- 4.
- Iterate 2 and 3 steps until convergence.
- Main functions: , and .
- Second-order interactions: , and .
- Third-order interaction: .
3. Main Functions of the Package Pspatreg
3.1. The Function Pspatfit()
3.1.1. The Argument Formula
3.1.2. Data Structure
3.1.3. Spatial Arguments
3.2. Plotting Smooth Terms
3.3. Computing Impact Functions
4. What Can Pspatreg Offer More than Other Software?
5. Examples for Cross-Sectional Data (2d)
5.1. Reading the Data
- -
- Lot_Area: Lot size in square feet.
- -
- Total_Bsmt_SF: Total square feet of basement area.
- -
- Garage_Cars: Size of garage in car capacity.
- -
- Gr_Liv_Area: Above grade (ground) living area square feet.
- -
- Fireplaces: Number of fireplaces.
5.2. Constructing the Spatial Weights Matrix
5.3. Estimating Parametric Spatial Linear Models
- ##
- ## Call
- ## pspatfit(formula = flin, data = ames_sf1, listw = lwames, type = "sar",
- ## method = "Chebyshev")
- ##
- ## Parametric Terms
- ## Estimate Std. Error t value Pr(>|t|)
- ## (Intercept) 2.4596366 0.0991499 24.8073 < 2.2e-16 ***
- ## lnLot_Area 0.0296596 0.0071596 4.1427 3.536e-05 ***
- ## lnTotal_Bsmt_SF 0.0488238 0.0029233 16.7019 < 2.2e-16 ***
- ## lnGr_Liv_Area 0.3773085 0.0130689 28.8706 < 2.2e-16 ***
- ## Garage_Cars 0.0943737 0.0051695 18.2559 < 2.2e-16 ***
- ## Fireplaces 0.0486969 0.0058596 8.3106 < 2.2e-16 ***
- ## rho 0.5019890 0.0123499 40.6471 < 2.2e-16 ***
- ## ---
- ## Signif. codes: 0 ’***’ 0.001 ’**’ 0.01 ’*’ 0.05 ’.’ 0.1 ’ ’ 1
- ##
- ## Goodness-of-Fit
- ##
- ## EDF Total: 7
- ## Sigma: 0.201487
- ## AIC: -6745.73
- ## BIC: -6704.22
- ##
- ## Total Parametric Impacts (sar)
- ## Estimate Std. Error t value Pr(>|t|)
- ## lnLot_Area 0.0603784 0.0146613 4.1182030 0
- ## lnTotal_Bsmt_SF 0.0982732 0.0063178 15.5550686 0
- ## lnGr_Liv_Area 0.7581528 0.0327675 23.1373076 0
- ## Garage_Cars 0.1896385 0.0114581 16.5505853 0
- ## Fireplaces 0.0977258 0.0119669 8.1663537 0
- ##
- ## Direct Parametric Impacts (sar)
- ## Estimate Std. Error t value Pr(>|t|)
- ## lnLot_Area 0.0319102 0.0076702 4.1602840 0
- ## lnTotal_Bsmt_SF 0.0519511 0.0030954 16.7831818 0
- ## lnGr_Liv_Area 0.4007849 0.0142408 28.1434593 0
- ## Garage_Cars 0.1002486 0.0055287 18.1322833 0
- ## Fireplaces 0.0516534 0.0061226 8.4365332 0
- ##
- ## Indirect Parametric Impacts (sar)
- ## Estimate Std. Error t value Pr(>|t|)
- ## lnLot_Area 0.0284682 0.0070539 4.0357950 1e-04
- ## lnTotal_Bsmt_SF 0.0463221 0.0035330 13.1113879 0e+00
- ## lnGr_Liv_Area 0.3573679 0.0213565 16.7334190 0e+00
- ## Garage_Cars 0.0893899 0.0065451 13.6575927 0e+00
- ## Fireplaces 0.0460724 0.0060279 7.6431596 0e+00
- ## Impact measures (lag, trace):
- ## Direct Indirect Total
- ## lnLot_Area 0.03148261 0.02804245 0.05952506
- ## lnTotal_Bsmt_SF 0.05184279 0.04617784 0.09802063
- ## lnGr_Liv_Area 0.40063291 0.35685505 0.75748796
- ## Garage_Cars 0.10012298 0.08918237 0.18930535
- ## Fireplaces 0.05168978 0.04604155 0.09773133
5.4. Estimating Semiparametric Nonlinear Models With and Without a Spatial Trend
- ##
- ## Call
- ## pspatfit(formula = fps, data = ames_sf1)
- ##
- ## Parametric Terms
- ## Estimate Std. Error t value Pr(>|t|)
- ## (Intercept) 11.5806060 0.0679093 170.5304 < 2.2e-16 ***
- ## Fireplaces 0.0709426 0.0069756 10.1700 < 2.2e-16 ***
- ## Garage_Cars 0.1588650 0.0063789 24.9047 < 2.2e-16 ***
- ## pspl(lnLot_Area) 0.0156563 0.0122900 1.2739 0.20280
- ## pspl(lnTotal_Bsmt_SF) 0.1213197 0.0239065 5.0748 4.139e-07 ***
- ## pspl(lnGr_Liv_Area) 0.0516587 0.0237088 2.1789 0.02943 *
- ## ---
- ## Signif. codes: 0 ’***’ 0.001 ’**’ 0.01 ’*’ 0.05 ’.’ 0.1 ’ ’ 1
- ##
- ## Non-Parametric Terms
- ## EDF
- ## pspl(lnLot_Area) 9.5779
- ## pspl(lnTotal_Bsmt_SF) 3.6633
- ## pspl(lnGr_Liv_Area) 12.8471
- ##
- ## Goodness-of-Fit
- ##
- ## EDF Total: 32.0883
- ## Sigma: 0.20342
- ## AIC: -5896.24
- ## BIC: -5705.98
- ##
- ## Call
- ## pspatfit(formula = fps, data = ames_sf1, listw = lwames, type = "sar",
- ## method = "Chebyshev")
- ##
- ## Parametric Terms
- ## Estimate Std. Error t value Pr(>|t|)
- ## (Intercept) 6.1642391 0.0492228 125.2313 < 2.2e-16 ***
- ## Fireplaces 0.0469980 0.0056748 8.2818 < 2.2e-16 ***
- ## Garage_Cars 0.0855018 0.0051776 16.5139 < 2.2e-16 ***
- ## pspl(lnLot_Area) 0.0200760 0.0090734 2.2126 0.02701 *
- ## pspl(lnTotal_Bsmt_SF) 0.0886416 0.0149158 5.9428 3.155e-09 ***
- ## pspl(lnGr_Liv_Area) 0.0412042 0.0196408 2.0979 0.03601 *
- ## rho 0.4652605 0.0125712 37.0099 < 2.2e-16 ***
- ## ---
- ## Signif. codes: 0 ’***’ 0.001 ’**’ 0.01 ’*’ 0.05 ’.’ 0.1 ’ ’ 1
- ##
- ## Non-Parametric Terms
- ## EDF
- ## pspl(lnLot_Area) 6.7873
- ## pspl(lnTotal_Bsmt_SF) 3.1119
- ## pspl(lnGr_Liv_Area) 13.8152
- ##
- ## Goodness-of-Fit
- ##
- ## EDF Total: 30.7144
- ## Sigma: 0.184702
- ## AIC: -6927.36
- ## BIC: -6745.25
- ##
- ## Call
- ## pspatfit(formula = fpsp2d, data = ames_sf1, listw = lwames, type ="sar",
- ## method = "Chebyshev")
- ##
- ## Parametric Terms
- ## Estimate Std. Error t value Pr(>|t|)
- ## (Intercept) 8.47756924 0.12220364 69.3725 < 2.2e-16 ***
- ## Fireplaces 0.05454867 0.00579113 9.4193 < 2.2e-16 ***
- ## Garage_Cars 0.06563134 0.00567565 11.5637 < 2.2e-16 ***
- ## Xspt.2 -0.10795583 0.11751199 -0.9187 0.3583452
- ## Xspt.3 -0.00080787 0.11692482 -0.0069 0.9944877
- ## Xspt.4 -0.02287410 0.11385028 -0.2009 0.8407810
- ## pspl(lnLot_Area) 0.03139985 0.00943208 3.3290 0.0008831 ***
- ## pspl(lnTotal_Bsmt_SF) 0.08678510 0.01744709 4.9742 6.962e-07 ***
- ## pspl(lnGr_Liv_Area) 0.05583719 0.02002986 2.7877 0.0053455 **
- ## rho 0.29097232 0.01749159 16.6350 < 2.2e-16 ***
- ## ---
- ## Signif. codes: 0 ’***’ 0.001 ’**’ 0.01 ’*’ 0.05 ’.’ 0.1 ’ ’ 1
- ##
- ## Non-Parametric Terms
- ## EDF
- ## pspl(lnLot_Area) 6.6923
- ## pspl(lnTotal_Bsmt_SF) 3.4601
- ## pspl(lnGr_Liv_Area) 14.1193
- ##
- ## Non-Parametric Spatio-Temporal Trend
- ## EDF
- ## f(sp1, sp2) 36.782
- ##
- ## Goodness-of-Fit
- ##
- ## EDF Total: 71.054
- ## Sigma: 0.182477
- ## AIC: -7001.36
- ## BIC: -6580.08
- ## logLik rlogLik edf AIC BIC
- ## linsar 3379.9 3348.4 7.000 -6745.7 -6641.2
- ## ps_sar 3494.4 3468.0 30.714 -6927.4 -6692.8
- ## psp2d_sar 3571.7 3539.7 71.054 -7001.4 -6517.9
- ## psp2dan_sar 3573.3 3541.4 76.311 -6994.1 -6479.9
- ## logLik rlogLik edf AIC BIC LRtest p.val
- ## ps_sar 3494.4 3468.0 30.714 -6927.4 -6692.8
- ## psp2d_sar 3571.7 3539.7 71.054 -7001.4 -6517.9 143.4 1.8124e-13
5.5. Examples of Plotting Spatial Trends for Spatial Point Coordinates
6. Examples for Spatial Panel Data (3d)
- Description of the dataset, spatial weights matrix, and model specifications.
- Estimation results of linear spatial models and comparison with those obtained with splm.
- Estimation results of semiparametric spatial models.
6.1. Dataset, Spatial Weights Matrix, and Model Specifications
6.2. Linear Model: Comparison with Splm
- ##
- ## Call
- ## pspatfit(formula = flin2, data = unemp_it, listw = lwsp_it, type ="sar",
- ## demean = TRUE, eff_demean = "twoways", index = c("prov",
- ## "year"))
- ##
- ## Parametric Terms
- ## Estimate Std. Error t value Pr(>|t|)
- ## empgrowth -0.129739 0.014091 -9.2074 < 2.2e-16 ***
- ## partrate 0.393087 0.023315 16.8595 < 2.2e-16 ***
- ## agri -0.036052 0.027267 -1.3222 0.1862167
- ## cons -0.166196 0.044510 -3.7339 0.0001928 ***
- ## serv 0.012378 0.020597 0.6009 0.5479300
- ## rho 0.265671 0.018858 14.0880 < 2.2e-16 ***
- ## ---
- ## Signif. codes: 0 ’***’ 0.001 ’**’ 0.01 ’*’ 0.05 ’.’ 0.1 ’ ’ 1
- ##
- ## Goodness-of-Fit
- ##
- ## EDF Total: 6
- ## Sigma: 1.86929
- ## AIC: 5396.53
- ## BIC: 5431.41
- ## pspatreg spml
- ## rho 0.266 0.266
- ## fixed_empgrowth -0.130 -0.130
- ## fixed_partrate 0.393 0.392
- ## fixed_agri -0.036 -0.037
- ## fixed_cons -0.166 -0.167
- ## fixed_serv 0.012 0.012
6.3. Semiparametric Spatial Panel Models
- ##
- ## Call
- ## pspatfit(formula = fpsp3dan, data = unemp_it, listw = lwsp_it,
- ## type = "sar", method = "Chebyshev")
- ##
- ## Parametric Terms
- ## Estimate Std. Error t value Pr(>|t|)
- ## (Intercept) 3.9757174 8.4450367 0.4708 0.6378
- ## partrate 0.1495539 0.0219457 6.8147 1.206e-11 ***
- ## agri -0.0205019 0.0197572 -1.0377 0.2995
- ## cons -0.0387163 0.0404494 -0.9572 0.3386
- ## f1_main.1 -1.8380455 13.2621302 -0.1386 0.8898
- ## f2_main.1 -15.5414740 10.9648616 -1.4174 0.1565
- ## ft_main.1 2.4143619 4.8934373 0.4934 0.6218
- ## f12_int.1 -8.7938027 12.3559132 -0.7117 0.4767
- ## f1t_int.1 4.1090210 6.4688949 0.6352 0.5254
- ## f2t_int.1 -2.1236074 6.7774834 -0.3133 0.7541
- ## f12t_int.1 1.4150889 7.6549475 0.1849 0.8534
- ## pspl(serv) 0.0915770 0.1681959 0.5445 0.5862
- ## pspl(empgrowth) -0.2880005 0.0655609 -4.3929 1.170e-05 ***
- ## rho 0.0064252 0.0193087 0.3328 0.7393
- ## ---
- ## Signif. codes: 0 ’***’ 0.001 ’**’ 0.01 ’*’ 0.05 ’.’ 0.1 ’ ’ 1
- ##
- ## Non-Parametric Terms
- ## EDF
- ## pspl(serv) 5.6796
- ## pspl(empgrowth) 2.6253
- ##
- ## Non-Parametric Spatio-Temporal Trend
- ## EDF
- ## f1 10.667
- ## f2 9.733
- ## ft 7.782
- ## f12 45.421
- ## f1t 4.239
- ## f2t 21.480
- ## f12t 82.057
- ##
- ## Goodness-of-Fit
- ##
- ## EDF Total: 203.683
- ## Sigma: 1.54113
- ## AIC: 5977.69
- ## BIC: 7161.65
- ## Error in .solve.checkCond(a, tol) :
- ## ’a’ is computationally singular, rcond(a)=3.71105e-17
- ##
- ## Call
- ## pspatfit(formula = fpsp3dan, data = unemp_it, listw = lwsp_it,
- ## type = "sar", method = "Chebyshev", cor = "ar1")
- ##
- ## Parametric Terms
- ## Estimate Std. Error t value Pr(>|t|)
- ## (Intercept) 3.9738e+00 8.2602e-05 4.8107e+04 < 2.2e-16 ***
- ## partrate 1.5220e-01 1.5408e-03 9.8783e+01 < 2.2e-16 ***
- ## agri -2.9875e-02 6.5566e-03 -4.5565e+00 5.472e-06 ***
- ## cons -3.2782e-02 1.1767e-03 -2.7858e+01 < 2.2e-16 ***
- ## f1_main.1 -1.2531e-01 5.8191e-04 -2.1535e+02 < 2.2e-16 ***
- ## f2_main.1 -1.2409e+01 7.1853e-04 -1.7271e+04 < 2.2e-16 ***
- ## ft_main.1 2.0255e+00 4.2745e-04 4.7385e+03 < 2.2e-16 ***
- ## f12_int.1 -6.1988e+00 3.7017e-04 -1.6746e+04 < 2.2e-16 ***
- ## f1t_int.1 1.7009e+00 5.9376e-06 2.8645e+05 < 2.2e-16 ***
- ## f2t_int.1 -3.8990e+00 2.0340e-05 -1.9169e+05 < 2.2e-16 ***
- ## f12t_int.1 2.5620e+00 2.4928e-04 1.0278e+04 < 2.2e-16 ***
- ## pspl(serv) 1.3822e-01 2.7308e-04 5.0615e+02 < 2.2e-16 ***
- ## pspl(empgrowth) -3.1413e-01 7.0032e-05 -4.4855e+03 < 2.2e-16 ***
- ## rho 5.0744e-02 2.1664e-02 2.3423e+00 0.01925 *
- ## phi 3.2957e-01 1.3700e-02 2.4056e+01 < 2.2e-16 ***
- ## ---
- ## Signif. codes: 0 ’***’ 0.001 ’**’ 0.01 ’*’ 0.05 ’.’ 0.1 ’ ’ 1
- ##
- ## Non-Parametric Terms
- ## EDF
- ## pspl(serv) 4.3076
- ## pspl(empgrowth) 2.4433
- ##
- ## Non-Parametric Spatio-Temporal Trend
- #### EDF
- ## f1 10.190
- ## f2 9.808
- ## ft 7.900
- ## f12 42.240
- ## f1t 3.605
- ## f2t 22.766
- ## f12t 45.466
- ##
- ## Goodness-of-Fit
- ##
- ## EDF Total: 162.726
- ## Sigma: 1.61722
- ## AIC: 5446.93
- ## BIC: 6392.82
- ## logLik rlogLik edf AIC BIC
- ## ps3dan_sar -2785.2 -2785.9 203.68 5977.7 7145.6
- ## ps3dan_sarar1 -2560.7 -2565.1 162.73 5446.9 6390.4
6.4. Plot of Spatial and Temporal Trends (3d)
7. Summary
Author Contributions
Funding
Data Availability Statement
Conflicts of Interest
References
- Montero, J.M.; Mínguez, R.; Durbán, M. SAR models with nonparametric spatial trends. A P-spline approach. Estad. Esp. 2012, 54, 89–111. [Google Scholar]
- Basile, R.; Durbán, M.; Mínguez, R.; Montero, J.M.; Mur, J. Modeling regional economic dynamics: Spatial dependence, spatial heterogeneity and nonlinearities. J. Econ. Dyn. Control. 2014, 48, 229–245. [Google Scholar] [CrossRef]
- Hoshino, T. Semiparametric Spatial Autoregressive Models with Endogenous Regressors: With an Application to Crime Data. J. Bus. Econ. Stat. 2018, 36, 160–172. [Google Scholar] [CrossRef]
- Mínguez, R.; Basile, R.; Durbán, M. An alternative semiparametric model for spatial panel data. Stat. Methods Appl. 2020, 29, 669–708. [Google Scholar] [CrossRef]
- Eilers, P.H.; Marx, B.D.; Durbán, M. Twenty years of P-splines. SORT-Stat. Oper. Res. Trans. 2015, 39, 149–186. [Google Scholar]
- LeSage, J.P.; Pace, R.K. Introduction to Spatial Econometrics; CRC Press: Boca Raton, FL, USA, 2009. [Google Scholar] [CrossRef]
- Elhorst, J.P. Spatial Econometrics. From Cross-Sectional Data to Spatial Panels; SpringerBriefs in Regional Science; Springer: Berlin/Heidelberg, Germany; New York, NY, USA, 2014. [Google Scholar] [CrossRef]
- Lee, D.; Durbán, M. P-Spline ANOVA Type Interaction Models for Spatio-Temporal Smoothing. Stat. Model. 2011, 11, 49–69. [Google Scholar] [CrossRef]
- Anselin, L. Spatial Econometrics: Methods and Models; Kluwer Academic Pub.: London, UK, 1988; Volume 4. [Google Scholar]
- McMillen, D.P. Perspectives on spatial econometrics: Linear smoothing with structured models. J. Reg. Sci. 2012, 52, 192–209. [Google Scholar] [CrossRef]
- Brunsdon, C.; Fotheringham, A.S.; Charlton, M.E. Geographically weighted regression: A method for exploring spatial nonstationarity. Geogr. Anal. 1996, 28, 281–298. [Google Scholar] [CrossRef]
- Cho, S.H.; Lambert, D.M.; Roberts, R.K.; Kim, S.G. Moderating urban sprawl: Is there a balance between shared open space and housing parcel size? J. Econ. Geogr. 2010, 10, 763–783. [Google Scholar] [CrossRef]
- Páez, A.; Uchida, T.; Miyamoto, K. A general framework for estimation and inference of geographically weighted regression models: 1. Location-specific kernel bandwidths and a test for locational heterogeneity. Environ. Plan. A 2002, 34, 733–754. [Google Scholar] [CrossRef]
- Pace, R.K.; LeSage, J.P. Spatial autoregressive local estimation. In Spatial Econometrics and Spatial Statistics; Springer: Berlin/Heidelberg, Germany, 2004; pp. 31–51. [Google Scholar]
- Geniaux, G.; Martinetti, D. A new method for dealing simultaneously with spatial autocorrelation and spatial heterogeneity in regression models. Reg. Sci. Urban Econ. 2017; Forthcoming. [Google Scholar] [CrossRef]
- Chudik, A.; Pesaran, M.H.; Tosetti, E. Weak and strong cross-section dependence and estimation of large panels. Econom. J. 2011, 14, C45–C90. [Google Scholar] [CrossRef]
- Eilers, P.H.C.; Marx, B.D. Flexible Smoothing with B-Splines and Penalties. Stat. Sci. 1996, 11, 89–121. [Google Scholar] [CrossRef]
- De Boor, C. Package for calculating with B-splines. J. Numer. Anal. 1977, 14, 441–472. [Google Scholar] [CrossRef]
- Ruppert, D. Selecting the number of knots for penalized splines. J. Comput. Graph. Stat. 2002, 11, 735–757. [Google Scholar] [CrossRef]
- Lee, D. Smoothing Mixed Models for Spatial and Spatio-Temporal Data. Ph.D. Thesis, University Carlos-III, Getafe, Spain, 2010. [Google Scholar]
- Eilers, P.H.; Marx, B.D. Practical Smoothing: The Joys of P-Splines; Cambridge University Press: Cambridge, UK, 2021. [Google Scholar] [CrossRef]
- Wood, S. Generalized Additive Models: An Introduction with R, 2nd ed.; Chapman and Hall/CRC: Boca Raton, FL, USA, 2017. [Google Scholar] [CrossRef]
- Rodríguez-Álvarez, M.X.; Lee, D.J.; Kneib, T.; Durbán, M.; Eilers, P.H.C. Fast smoothing parameter separation in multidimensional generalized P-splines: The SAP algorithm. Stat. Comput. 2015, 25, 941–957. [Google Scholar] [CrossRef]
- Bates, D.; Mullen, K.M.; Nash, J.C.; Varadhan, R. Minqa: Derivative-Free Optimization Algorithms by Quadratic Approximation; R Package Version 1.2.5; R Foundation for Statistical Computing: Vienna, Austria, 2022; Available online: https://www.google.com.hk/url?sa=t&source=web&rct=j&opi=89978449&url=https://rdrr.io/cran/minqa/&ved=2ahUKEwitx5zS-NOJAxXTrlYBHTnvMk8QFnoECBQQAQ&usg=AOvVaw3G00dnjwc1_isOQMAWhjNu (accessed on 1 September 2024).
- Fahrmeir, L.; Kneib, T.; Lang, S.; Marx, B.D. Regression; Springer: Berlin/Heidelberg, Germany, 2022. [Google Scholar] [CrossRef]
- Lee, D.J.; Durbán, M.; Eilers, P.H.C. Efficient two-dimensional smoothing with P-spline ANOVA mixed models and nested bases. Comput. Stat. Data Anal. 2013, 61, 22–37. [Google Scholar] [CrossRef]
- Blundell, R.; Powell, J. Advances in Economics and Econometrics Theory and Application. In Chapter Endogeneity in Nonparametric and Semiparametric Regression Models; Cambridge University Press: Cambridge, UK, 2003. [Google Scholar]
- Bivand, R.; Millo, G.; Piras, G. A Review of Software for Spatial Econometrics in R. Mathematics 2021, 9, 1276. [Google Scholar] [CrossRef]
- Bivand, R.S.; Pebesma, E.; Gomez-Rubio, V. Applied Spatial Data Analysis with R, 2nd ed.; Springer: New York, NY, USA, 2013. [Google Scholar]
- Bivand, R. R Packages for Analyzing Spatial Data: A Comparative Case Study with Areal Data. Geogr. Anal. 2022, 54, 488–518. [Google Scholar] [CrossRef]
- Piras, G. sphet: Spatial Models with Heteroskedastic Innovations in R. J. Stat. Softw. 2010, 35, 1–21. [Google Scholar] [CrossRef]
- Juhl, S. spfilteR: An R Package for Semiparametric Spatial Filtering with Eigenvectors in (Generalized) Linear Models. R J. 2021, 13, 450–459. [Google Scholar] [CrossRef]
- Bivand, R.; Yu, D. spgwr: Geographically Weighted Regression; R Package Version 0.6-35; R Foundation for Statistical Computing: Vienna, Austria, 2022. [Google Scholar]
- Mínguez, R.; López, F.A.; Mur, J. spsur: An R Package for Dealing with Spatial Seemingly Unrelated Regression Models. J. Stat. Softw. 2022, 104, 1–43. [Google Scholar] [CrossRef]
- Millo, G.; Piras, G. splm: Spatial Panel Data Models in R. J. Stat. Softw. 2012, 47, 1–38. [Google Scholar] [CrossRef]
- Simonovska, R. Spatial Dynamic Panel Data Modeling; R Package Version 0.0.1; R Foundation for Statistical Computing: Vienna, Austria, 2022. [Google Scholar]
- Rodríguez-Álvarez, M.X.; Boer, M.P.; van Eeuwijk, F.A.; Eilers, P.H. Correcting for spatial heterogeneity in plant breeding experiments with P-splines. Spat. Stat. 2017, 23, 52–71. [Google Scholar] [CrossRef]
- Eilers, P.; Marx, B.; Li, B.; Gampe, J.; Rodriguez-Alvarez, M.X. JOPS: Practical Smoothing with P-Splines; R Package Version 0.1.15; R Foundation for Statistical Computing: Vienna, Austria, 2021. [Google Scholar]
- Drukker, D.M.; Prucha, I.R.; Raciborski, R. A Command for Estimating Spatial-Autoregressive Models with Spatial-Autoregressive Disturbances and Additional Endogenous Variables. Stata J. 2013, 13, 287–301. [Google Scholar] [CrossRef]
- Drukker, D.M.; Prucha, I.R.; Raciborski, R. Maximum Likelihood and Generalized Spatial Two-Stage Least-Squares Estimators for a Spatial-Autoregressive Model with Spatial-Autoregressive Disturbances. Stata J. 2013, 13, 221–241. [Google Scholar] [CrossRef]
- Belotti, F.; Hughes, G.; Mortari, A.P. Spatial panel-data models using Stata. Stata J. 2017, 17, 139–180. [Google Scholar] [CrossRef]
- LeSage, J.P. Spatial Econometrics; Department of Economics, University of Toledo: Toledo, OH, USA, 1998. [Google Scholar]
- Elhorst, J.P. Matlab Software for Spatial Panels. Int. Reg. Sci. Rev. 2014, 37, 389–405. [Google Scholar] [CrossRef]
- LeSage, J.P. A Panel Data Toolbox for Matlab; Department of Economics, University of Toledo: Toledo, OH, USA, 2021. [Google Scholar]
- Kuhn, M. AmesHousing: The Ames Iowa Housing Data; R Package Version 0.0.4; R Foundation for Statistical Computing: Vienna, Austria, 2020. [Google Scholar]
Model | spatialreg/sphet | splm/SDPDm | pspatreg | mgcv/SpATS/JOPS |
---|---|---|---|---|
ps | par. (2d) | par. (panel) | full | full |
ps-slx | par. (2d) | par. (panel) | full | full |
ps-sar | par. (2d) | par. (panel) | full | - |
ps-sem | par. (2d) | par. (panel)/- | full | - |
ps-sdm | par. (2d) | par. (panel) | full | - |
ps-sdem | par. (2d) | par. (panel)/- | full | - |
ps-sarar | par. (2d) | par. (panel)/- | full | - |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2024 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Mínguez, R.; Basile, R.; Durbán, M. Pspatreg: R Package for Semiparametric Spatial Autoregressive Models. Mathematics 2024, 12, 3598. https://doi.org/10.3390/math12223598
Mínguez R, Basile R, Durbán M. Pspatreg: R Package for Semiparametric Spatial Autoregressive Models. Mathematics. 2024; 12(22):3598. https://doi.org/10.3390/math12223598
Chicago/Turabian StyleMínguez, Román, Roberto Basile, and María Durbán. 2024. "Pspatreg: R Package for Semiparametric Spatial Autoregressive Models" Mathematics 12, no. 22: 3598. https://doi.org/10.3390/math12223598
APA StyleMínguez, R., Basile, R., & Durbán, M. (2024). Pspatreg: R Package for Semiparametric Spatial Autoregressive Models. Mathematics, 12(22), 3598. https://doi.org/10.3390/math12223598