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

autocor

Global Spatial Autocorrelation Statistics


Description

Functions to calculate Moran's I and Geary's c statistics.

Usage

moran(x,d1,d2,...) 
geary(x,d1,d2,...)

Arguments

x

a raster object (RasterLayer or SpatialPointsDataFrame or SpatialPolygonsDataFrame

d1

lower bound local distance, or an object of class neighbours created by dneigh when x is SpatialPoints or SpatialPolygons

d2

upper bound local distance

...

additional arguments including zcol (when x is Spatial* object, specifies the name of the variable in the dataset; longlat (when x is Spatial* object, spacifies whether the dataset has a geographic coordinate system

Details

moran and geary are two functions to measure global spatial autocorrelation within the range of distance specified through d1 and d2. It returns a single numeric value than can show the degree of spatial autocorrelation in the whole dataset.

Value

A numeric value.

Author(s)

Babak Naimi naimi.b@gmail.com

References

Naimi, B., Hamm, N. A., Groen, T. A., Skidmore, A. K., Toxopeus, A. G., & Alibakhshi, S. (2019). ELSA: Entropy-based local indicator of spatial association. Spatial statistics, 29, 66-88.

Examples

file <- system.file('external/dem_example.grd',package='elsa')
r <- raster(file)

moran(r, d1=0, d2=2000)

geary(r, d1=0, d2=2000)

elsa

Entropy-Based Local Indicator of Spatial Association

v1.1-28
GPL (>= 3)
Authors
Babak Naimi [cre, aut] (<https://orcid.org/0000-0001-5431-2729>), Roger Bivand [ctb] (part of the dnn C code, from the spdep package), William Venables [ctb] (part of the dnn C code, taken from the spdep package), Brian Ripley [ctb] (part of the dnn C code, taken from the spdep package)
Initial release
2020-03-13

We don't support your browser anymore

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