lisa: Local indicator of spatial association

View source: R/lisa.R

lisaR Documentation

Local indicator of spatial association

Description

lisa is a function to estimate the local indicators of spatial association. The function assumes univariate data at each location. For multivariate data use lisa.nc

Usage

lisa(x, y, z, neigh, resamp = 999, latlon = FALSE, quiet = FALSE)

Arguments

x

vector of length n representing the x coordinates (or latitude; see latlon).

y

vector of length n representing the y coordinates (or longitude).

z

vector of n representing the observation at each location.

neigh

neighborhood size.

resamp

number of resamples under the NULL to generate p-values

latlon

If TRUE, coordinates are latitude and longitude.

quiet

If TRUE, the counter is suppressed during execution.

Details

This is the function to estimate the local indicators of spatial association modified form Anselin (1995). The statistic is the average autocorrelation within a neighborhood.

Value

An object of class "lisa" is returned, consisting of the following components:

correlation

the autocorrelation within the neighborhood (neigh) of each observation measured using Moran's I.

p

the permutation two-sided p-value for each observation.

mean

the mean of the observations inside each neighborhooddistance within each neighborhood.

n

the number of observations within each neighborhood.

dmean

the actual mean distance within each neighborhood.

z

the original observations

coord

a list with the x and y coordinates.

Author(s)

Ottar N. Bjornstad onb1@psu.edu

References

Anselin, L. 1995. Local indicators of spatial association - LISA. Geographical Analysis 27:93-115. <doi:10.1111/j.1538-4632.1995.tb00338.x>

See Also

plot.lisa

Examples

# first generate some sample data
x <- expand.grid(1:20, 1:5)[, 1]
y <- expand.grid(1:20, 1:5)[, 2]

# z data from an exponential random field
z <- rmvn.spa(x = x, y = y, p = 2, method = "gaus")

# lisa analysis
fit1 <- lisa(x = x, y = y, z = z, neigh = 3, resamp = 499)
## Not run: plot(fit1, neigh.mean=FALSE)

bjornsta/ncf documentation built on June 3, 2022, 11:43 a.m.