elsa.test | R Documentation |
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.
elsa.test(x, d, n, method, null, nc, categorical, dif,classes,...)
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 |
classes |
Optional, only when |
... |
Aditional arguments passed to writeRaster function (applied only when x is Raster) |
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.
An object same as the input (x
)
Babak Naimi naimi.b@gmail.com
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.
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.