Heteroscedasticity consistent standard errors for Spatial error models
On Thu, 7 Dec 2006, Achim Zeileis wrote:
On Thu, 7 Dec 2006, Samarasinghe, Oshadhi Erandika wrote:
Hello, Could anyone please tell me how to estimate Heteroscedasticity Consistent standard errors for a Spatial error model? All the functions I have looked at only works for lm objects.
I assume that you looked also at the "sandwich" package: The methods there
do not only work for "lm" objects but are object-oriented, appropriate
methods are already provided for a range of different object classes. So,
in principle, you can plug in other models as well, potentially including
spatial models if appropriate methods are provided. See
vignette("sandwich-OOP", package = "sandwich")
Disclaimer: I'm not sure whether the spatial structure of spatial models
will be appropriately captured by the class of estimators implemented in
"sandwich". But someone who knows spatial models and their HC covariances
should be able to figure that out from the vignette above. I'm also not
sure what specialized methods exist...
Typically, the use of HC covariances with these kinds of models is an inappropriate fix for missing variables and possibly also wrong functional forms. Some supervisors want them, but in practice fitting a better specified model is superior. It is also possible to sample from the fitted model - I've been looking at MH sampling from MCMCpack - and that I feel is a way to go if the model is badly specified and you can't do anything about it. Settings where "natural experiments" exist are also very helpful, with shifts in coefficient values and/or standard errors indicating whether the hypothesised cause of difference actually had an effect. It can probably be done, and some journals/referees/supervisors etc. want HC covariances, but I'm afraid that doesn't necessarily mean that they are any use in practice with these pretty rough kinds of models. Roger
Best, Z
Thank you very much! - Oshadhi
______________________________________________ R-help at stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
______________________________________________ R-help at stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Roger Bivand Economic Geography Section, Department of Economics, Norwegian School of Economics and Business Administration, Helleveien 30, N-5045 Bergen, Norway. voice: +47 55 95 93 55; fax +47 55 95 95 43 e-mail: Roger.Bivand at nhh.no