Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

gwr.morantest

Moran's I for gwr objects


Description

The function returns Leung et al. (2000) three moment approximation for Moran's I, for a gwr object calculated with argument hatmatrix=TRUE. This implementation should not be regarded as authoritative, as it involves assumptions about implied methods and about estimated degrees of freedom.

Usage

gwr.morantest(x, lw, zero.policy = FALSE)

Arguments

x

a gwr object returned by gwr() with argument hatmatrix=TRUE

lw

a listw object created for example by nb2listw in the spdep package

zero.policy

if TRUE assign zero to the lagged value of zones without neighbours, if FALSE (default) assign NA

Value

a “htest” object with the results of testing the GWR residuals

Author(s)

Roger Bivand

References

Leung Y, Mei C-L, Zhang W-X 2000 Testing for spatial autocorrelation among the residuals of the geographically weighted regression, Environment and Planning A, 32, 871-890.

Examples

if (suppressWarnings(require(spData)) && suppressWarnings(require(spdep))) {
  data(columbus, package="spData")
  bw <- gwr.sel(CRIME ~ INC + HOVAL, data=columbus, coords=coords)
  col0 <- gwr(CRIME ~ INC + HOVAL, data=columbus, coords=coords,
    bandwidth=bw, hatmatrix=TRUE)
  gwr.morantest(col0, nb2listw(col.gal.nb))
}

spgwr

Geographically Weighted Regression

v0.6-34
GPL (>= 2)
Authors
Roger Bivand [cre, aut] (<https://orcid.org/0000-0003-2392-6140>), Danlin Yu [aut], Tomoki Nakaya [ctb], Miquel-Angel Garcia-Lopez [ctb]
Initial release
2020-08-25

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.