elsa: Entropy-based Local indicators of Spatial Association

Description Usage Arguments Details Value Author(s) References Examples

Description

Calculate ELSA indicator for either a categorical or continuous spatial dataset.

Usage

1
elsa(x,d,nc,categorical,dif,...) 

Arguments

x

a raster object (RasterLayer or SpatialPointsDataFrame or SpatialPolygonsDataFrame

d

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

nc

optional, for continuous data it specifies the number of classes through categorizing the variable. If missed, it is automatically calculated (recommended)

categorical

logical, specified whether x is a continuous or categorical. If missed the function tries to detect it

dif

the difference between categories, only for categorical

...

additional arguments including: stat - specifies which components of ELSA should be returned and can be "E" (default), "L", and "R" (see details); cells - when the elsa is needed for only some cells in the raster data; filename - the name of the raster file when the output should be written

Details

dif can be used when categorical values are sorted into hierarchical system (e.g., CORINE land cover). This make it possible to difine different weights of similarity between each pairs of categories when the level of similarity is not the same between different classes in the variable. For example, two categories belong to two forest types are more similar than two categories, one a forest type and the other one an agriculture type. So, it can take this differences into account when the spatial autocorrelation for categorical variables is quantified.

the ELSA statistics has two terms that is called the left term ("L") and the right term ("R") in the reference. It can be specified through the stat argument if either of these terms should be returned from the function or ELSA ("E"), which is the multiplication of L * R. All three terms can also be selected.

Value

RasterLayer

if x is a RasterLayer

Author(s)

Babak Naimi naimi.b@gmail.com

http://r-gis.net

References

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
## Not run: 

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

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

e <- elsa(r,d=2000,categorical=FALSE)

plot(e)


## End(Not run)

Example output

Loading required package: sp
Loading required package: raster
sh: 1: awk: Permission denied
sh: 1: awk: Permission denied
sh: 1: awk: Permission denied
sh: 1: awk: Permission denied
sh: 1: awk: Permission denied
sh: 1: awk: Permission denied
sh: 1: awk: Permission denied

The input dataset is considered as a big raster dataset that will be handled out of memory (on the disk), but if you have enough memory on your machine, you can change the settings for maxmemory, and chuncksize, in the rasterOptions function, then the process may be handled in memory that would be much faster...Warning messages:
1: In .rasterFromRasterFile(grdfile, band = band, objecttype, ...) :
  size of values file does not match the number of cells (given the data type)
2: In .rasterFromRasterFile(grdfile, band = band, objecttype, ...) :
  size of values file does not match the number of cells (given the data type)
Warning message:
In matrix(x, ncol = cr[1], nrow = cr[2], byrow = TRUE) :
  data length [1989] is not a sub-multiple or multiple of the number of columns [71]

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

Related to elsa in elsa...