Robust Standard Errors in spatial error models

381 views Asked by At

I am fitting a Spatial Error Model using the errorsarlm() function in the spdep library. The Breusch-Pagan test for spatial models, calculated using the bptest.sarlm() function, suggest the presence of heteroskedasticity.

A natural next step would be to get the robust standard error estimates and update the p-values. In the documentation of the bptest.sarlm() function says the following:

"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."

and the following code (as reference) is presented:

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))} 

where error.col is the spatial error model estimated.

Now, I can easily adapt the code to my problem and get the robust standard errors. Nevertheless, I was wondering:

  • What exactly is the “lm.target” component of sarlm objects? I can not find any mention to it in the spdep documentation.
  • What exactly are $tary and $tarX? Again, it does not seem to be mentioned on the documentation.
  • Why documentation says it is "technically possible to make heteroskedasticity corrections"? Does it mean that proposed approach is not really recommended to overcome issues of heteroskedasticity?
1

There are 1 answers

0
Orlando Sabogal On BEST ANSWER

I report this issue on github and had a 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?