On Wed, 8 Mar 2023, Denys Dukhovnov via R-sig-Geo wrote:
Almost 7 years ago there was a question on panel SDM model impacts, as
run following the models in splm package.
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
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:
lw <- nb2listw(col.gal.nb)
mod_SDEM <- errorsarlm(CRIME ~ INC + HOVAL, data=columbus, lw,
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,
Thank you very much.
R-sig-Geo mailing list
Department of Economics, Norwegian School of Economics,
Postboks 3490 Ytre Sandviken, 5045 Bergen, Norway.
R-sig-Geo mailing list