elsa.test: Elsa test for local spatial autocorrelation

Description Usage Arguments Details Value Author(s) References Examples

Description

This function uses a non-parametric approach to test whether local spatial autocorrelation (characterised by ELSA) is significant. It generates a p-value at each spatial location (a raster cell or spatial point/polygon) that can be used to infer the significancy of local spatial autocorrelation.

Usage

1
elsa.test(x, d, n, method, null, nc, categorical, dif,classes,...)

Arguments

x

A Raster or Spatial* dataset

d

the local distance, or an object of class neighbours created by dneigh function

n

number of simulation, default is 999 for small datasets, and 99 for large datasets

null

Optional, a null distribution of data (a Raster if x is Raster or a numerical vector if x is either Raster or Spatial dataset ); if not provided, a null distribution is generated by the function

method

resampling method for nonparametric simulation, can be either 'boot' (bootstraping; default) or 'perm' (permutation)

nc

number of classes (only if x is a continuous variable); if not specified, it is estimated using nclass function

categorical

logical, specifies whether x is a categorical; if not specified, it is guessed by the function

dif

the level of dissimilarities between different categories (only if x is a categorical variable); see dif2list for more details

classes

Optional, only when x is categorical is a character vector contains classes; would be useful when the dataset is part of a bigger dataset or when it does not contain all the categories, then by specifying the full set of categories, they will be taken into account to calculate ELSA, and therefore, it would be comparable with the other dataset with the same list of classes (these classes may alternatively introduce by dif, as the classes considered to specify dissimilarities in dif list, would be used as classes)

...

Aditional arguments passed to writeRaster function (applied only when x is Raster)

Details

This function test how significant the local spatial autocorrelation is at each location, so it generates a p-value at each location through a Monte Carlo simulation and a non-parametric approach. See the reference for the details about the method.

If null distribution is not provided, the function generates a null distribution by randomly shuffling the values in the dataset.

Value

An object same as the input (x)

Author(s)

Babak Naimi naimi.b@gmail.com

http://r-gis.net

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

1
2
3
4
5
6
7
8
9
file <- system.file('external/dem_example.grd',package='elsa')

r <- raster(file)

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

et <- elsa.test(r,d=2000,n=99, categorical=FALSE)

plot(et)

elsa documentation built on March 19, 2020, 5:12 p.m.