Skip to content

testing linear combinations of coefficients after spatial regression

3 messages · Jason Sorens, Roger Bivand

#
On Sat, 2 Jul 2011, Jason Sorens wrote:

            
See the linearHypothesis() methods in the car package. I think that, after 
someone has checked that all is as it should be, sarlm objects could get a 
vcov() method, which they do not have now. These work formally, but are 
not checked:

library(car)
library(spdep)
example(columbus)
lmobj <- lm(CRIME ~ HOVAL+INC, data=columbus)
linearHypothesis(lmobj, "HOVAL-INC=0", test="Chisq")
lagobj <- lagsarlm(CRIME ~ HOVAL+INC, data=columbus,
   listw=nb2listw(col.gal.nb))
linearHypothesis(lagobj, "HOVAL-INC=0", test="Chisq",
   vcov.=lagobj$resvar[2:5,2:5])
errobj <- errorsarlm(CRIME ~ HOVAL+INC, data=columbus,
   listw=nb2listw(col.gal.nb))
linearHypothesis(errobj, "HOVAL-INC=0", test="Chisq",
   vcov.=errobj$resvar[2:5,2:5])

Please do check that this is an appropriate use of the returned values 
when fitted using eigenvalues. Other steps would be needed when a (mixed) 
numerical Hessian is used to approximate the variance/covariance matrix of 
the coefficients. Then a vcov() method could be added for sarlm objects, 
but it needs caution and analysis.

Hope this helps,

Roger