lisa: Local indicators of Spatial Associations

Description Usage Arguments Details Value Author(s) References Examples

Description

Calculate local indicators of spatial association (LISA) for a continuous (numeric) variable at each location in a Raster layer or a SpatialPointsDataFrame or a SpatialPolygonsDataFrame.

Usage

1
lisa(x,d1,d2,statistic,...) 

Arguments

x

a raster object (RasterLayer or SpatialPointsDataFrame or SpatialPolygonsDataFrame

d1

numeric lower bound of local distance (default=0), or an object of class neighbours created by dneigh when x is SpatialPoints or SpatialPolygons

d2

numeric upper bound of local distance, not needed if d1 is a neighbours object,

statistic

a character string specifying the LISA statistic that should be calculated. This can be one of "I" (or "localmoran" or "moran"), "c" (or "localgeary" or "geary"), "G" (or "localG"), "G*" (or "localG*")

...

additional arguments including filename (only when x is Raster, specifies the name of the raster file when the output should be written; additional arguments for writeRaster function can also be specified); mi (only when x is Raster and statistic='I', specifies whether raw Local Moran's I statistic (Ii) should be returned, or standardized value (Z.Ii). e.g., mi="I", mi='Z' (default)); zcol (only when x is a Spatial* object specifies the name of the variable column in the data); longlat (logical, only when x is a Spatial* object specifies whether the coordinate system is geographic); drop (logical, only when x is a Spatial* object, if TRUE, the original data structure (Spatial* object) is returned, otherwise a numeric vector is returned)

Details

This function can calculate different LISA statistics at each location in the input dataset. The statistics, implemented in this function, include local Moran's I ("I"), local Geary's c ("c"), local G and G* ("G" and "G*"). This function returns standardized value (Z) for Moran, G and G*.

Value

RasterLayer

if x is a RasterLayer

Spatial*

if x is a Spatial* and drop=FALSE

numeric vector

if x is a Spatial* and drop=TRUE

Author(s)

Babak Naimi naimi.b@gmail.com

http://r-gis.net

References

Anselin, L. 1995. Local indicators of spatial association, Geographical Analysis, 27, 93–115;

Getis, A. and Ord, J. K. 1996 Local spatial statistics: an overview. In P. Longley and M. Batty (eds) Spatial analysis: modelling in a GIS environment (Cambridge: Geoinformation International), 261–277.

Naimi. B. et al. (under review) ELSA: An Entropy-based Local indicators of Spatial Association, Geographical Analysis

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
## Not run: 

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

plot(r,main='a continuous raster map')

mo <- lisa(r,d2=2000,statistic='i') # local moran's I (Z.Ii value)

plot(mo, main="local Moran's I (Z.Ii)")

mo <- lisa(r,d2=2000,statistic='i',mi='I') # local moran's I (Ii value  (non-standardized))

plot(mo, main="local Moran's I (Ii))")

gc <- lisa(r,d2=2000,statistic='c') # local Geary's c

plot(gc, main="local Geary's c")

g <- lisa(r,d2=2000,statistic='g') # local G

plot(g, main="local G")


## End(Not run)

Example output

Loading required package: sp
Loading required package: raster
sh: 1: awk: Permission denied
Warning message:
In .rasterFromRasterFile(grdfile, band = band, objecttype, ...) :
  size of values file does not match the number of cells (given the data type)
sh: 1: awk: Permission denied
Warning message:
In .rasterFromRasterFile(grdfile, band = band, objecttype, ...) :
  size of values file does not match the number of cells (given the data type)
sh: 1: awk: Permission denied
sh: 1: awk: Permission denied

elsa documentation built on May 2, 2019, 4:49 p.m.

Related to lisa in elsa...