Last chance! 50% off unlimited learning
Sale ends in
lm.morantest.sad(model, listw, zero.policy=NULL, alternative="greater",
spChk=NULL, resfun=weighted.residuals, tol=.Machine$double.eps^0.5,
maxiter=1000, tol.bounds=0.0001, zero.tol = 1e-07, Omega=NULL,
save.M=NULL, save.U=NULL)
## S3 method for class 'moransad':
print(x, ...)
## S3 method for class 'moransad':
summary(object, ...)
## S3 method for class 'summary.moransad':
print(x, ...)
lm
returned by lm
; weights
may be specified in the lm
fit, but offsets should not be usedlistw
object created for example by nb2listw
get.spChkOption()
lm
object, may be residuals
, weighted.residuals
, rstandard
, or rstudent
uniroot
uniroot
uniroot
Omega <- invIrW(listw, rho=0.1); Omega <- tcrossprod(Omega)
, chol()
is taken internallyspdep:::exactMoranAlt
spdep:::exactMoranAlt
moransad
with the following components:uniroot
lm.morantest
require(maptools)
eire <- readShapePoly(system.file("etc/shapes/eire.shp", package="spdep")[1],
ID="names", proj4string=CRS("+proj=utm +zone=30 +units=km"))
eire.nb <- poly2nb(eire)
#data(eire)
e.lm <- lm(OWNCONS ~ ROADACC, data=eire)
lm.morantest(e.lm, nb2listw(eire.nb))
lm.morantest.sad(e.lm, nb2listw(eire.nb))
summary(lm.morantest.sad(e.lm, nb2listw(eire.nb)))
e.wlm <- lm(OWNCONS ~ ROADACC, data=eire, weights=RETSALE)
lm.morantest(e.wlm, nb2listw(eire.nb), resfun=rstudent)
lm.morantest.sad(e.wlm, nb2listw(eire.nb), resfun=rstudent)
Run the code above in your browser using DataLab