[R-sig-Geo] Impacts for panel SDM and SDEM models in splm (revisited)

Roger Bivand Roger@B|v@nd @end|ng |rom nhh@no
Thu Mar 9 20:33:45 CET 2023


On Wed, 8 Mar 2023, Denys Dukhovnov via R-sig-Geo wrote:

> Dear community,
>
> Almost 7 years ago there was a question on panel SDM model impacts, as 
> run following the models in splm package.
>
> https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fstat.ethz.ch%2Fpipermail%2Fr-sig-geo%2F2016-April%2F024326.html&data=05%7C01%7CRoger.Bivand%40nhh.no%7Cd936e7918f3c4e280e6a08db1f841da0%7C33a15b2f849941998d56f20b5aa91af2%7C0%7C0%7C638138424517495097%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=OE%2FLj3rYMXmz8Go11R1oHrslxVr6oC4WnOWUtjTdxNU%3D&reserved=0
>
> The answer given by Roger Bivand then was that there is no built-in 
> function for inference of SDM and SDEM impacts available and instead the 
> impacts could be derived by following a stepwise process using dense 
> weight matrices multiplying the inv(I - rho*W) matrix and the respective 
> model coefficients, differently for Durbin and non-Durbin covariates.

Both released splm (1.6-2) and the especially the development version, 
which may be installed with install.packages("splm", 
repos="http://R-Forge.R-project.org"), have more support for estimating 
for models including the spatially lagged response (SLM/SAR, SDM, etc.). 
They do not, however, support impact measures for Durbin-type models (SLX, 
SDEM, etc.). It seems that impacts are hard to combine with the various 
estimation methods for spatial panel models.

>
> I would like to follow up with 2 more questions. As I did not find any, 
> I am assuming there is still no built-in package function implementation 
> for panel spatial Durbin and Durbin error impacts:

> 1) Would this solution work the same way for panel SDEM specification
>    (that is, for the Durbin, local spillover effect only)?

No, it would not work, because in the sense of Vega & Elhorst (2015) and 
LeSage (2014), SAR/SDM etc. are global impacts, requiring sampling from 
the fitted model for inference, while SLX and SDEM are local impacts, with 
the total impacts being a linear combination of the coefficients on the 
unlagged and lagged covariates.

> 2) How could one generate the p-values for the direct, indirect, and
>    total impacts using this method, as given by spdep::impacts() output
>    for SAR and SLX models? Would one need to run some form of
>    simulations?
>

In the cross-sectional case, impacts methods are provided, but you can 
also use multcomp::glht() because fitted model objects have coef() 
and vcov() methods, which glht() can use:

library(spdep)
data(columbus)
lw <- nb2listw(col.gal.nb)
library(spatialreg)
mod_SDEM <- errorsarlm(CRIME ~ INC + HOVAL, data=columbus, lw,
  Durbin=TRUE)
summary(impacts(mod_SDEM))
summary(multcomp::glht(mod_SDEM, c("INC + lag.INC == 0", "HOVAL + 
lag.HOVAL == 0")))

The difference in the p-values is because the spatialreg case (this will 
be changed!), the alternative= is assumed to be "greater", not "two-sided" 
as in the multcomp case, and cannot (yet) be changed by the user.

If splm provided coef() and modified vcov() methods (modified to name the 
columns and rows of the returned objects), then progress would be 
possible, but I'm unsure whether a spatial Durbin error model can be 
fitted without adding thw WX columns manually.

Hope this clarifies,

Roger


> Thank you very much.
>
> Best,
> Denys Dukhovnov
>
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo using r-project.org
> https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fstat.ethz.ch%2Fmailman%2Flistinfo%2Fr-sig-geo&data=05%7C01%7CRoger.Bivand%40nhh.no%7Cd936e7918f3c4e280e6a08db1f841da0%7C33a15b2f849941998d56f20b5aa91af2%7C0%7C0%7C638138424517495097%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=Ch4g7dSq4kxIOg6wYgZywtPxk6XBMXyK0BFp2HQPTjQ%3D&reserved=0
>

-- 
Roger Bivand
Emeritus Professor
Department of Economics, Norwegian School of Economics,
Postboks 3490 Ytre Sandviken, 5045 Bergen, Norway.
e-mail: Roger.Bivand using nhh.no
https://orcid.org/0000-0003-2392-6140
https://scholar.google.no/citations?user=AWeghB0AAAAJ&hl=en



More information about the R-sig-Geo mailing list