空间误差模型中的稳健标准误差

Robust Standard Errors in spatial error models

我正在使用 errorsarlm() function in the spdep 库拟合空间误差模型。 使用 bptest.sarlm() 函数计算的空间模型的 Breusch-Pagan 检验表明存在异方差性。

自然而然的下一步是获得稳健的标准误差估计值并更新 p 值。在 bptest.sarlm() 函数的文档中说明如下:

"It is also technically possible to make heteroskedasticity corrections to standard error estimates by using the “lm.target” component of sarlm objects - using functions in the lmtest and sandwich packages."

并提供以下代码(作为参考):

lm.target <- lm(error.col$tary ~ error.col$tarX - 1)
if (require(lmtest) && require(sandwich)) {
  print(coeftest(lm.target, vcov=vcovHC(lm.target, type="HC0"), df=Inf))} 

其中 error.col 是估计的空间误差模型。

现在,我可以轻松地使代码适应我的问题并获得稳健的标准错误。 不过,我想知道:

我在 github 上报告了这个问题并收到了 response by Roger Bivand:

No, the approach is not recommended at all. Either use sphet or a Bayesian approach giving the marginal posterior distribution. I'll drop the confusing documentation. tary is $y - \rho W y$ and similarly for tarX in the spatial error model case. Note that tary etc. only occur in spdep in documentation for localmoran.exact() and localmoran.sad(); were you using out of date package versions?