Learn R Programming

ncf (version 1.1-2)

lisa: Local inidcator 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, latlon, 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 p (>1) observation at each location.
neigh
neighborhood size.
resamp
number of resamples under the NULL to generate p-values
latlon
Not yet implemented: if TRUE, coordinates are latitude and longitude.
quiet
if TRUE the counter is supressed during execution.

Value

  • An object of class "lisa" is returned, consisting of the following components:
  • nthe number of pairs within each neighborhood.
  • dmeanthe actual mean of distance within each neighborhood.
  • correlationthe mean autocorrelation within the neighborhood (neigh).
  • pthe permutation two-sided p-value for each distance-class.
  • coorda list with the x and y coordinates.

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.

References

Anselin, L. 1995. Local indicators of spatial association - LISA. Geographical Analysis 27:93-115.

See Also

plot.lisa

Examples

Run this code
#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="exp")
    
#lisa analysis
    fit1 <- lisa(x=x, y=y, z=z, neigh=3, resamp=100)
    plot.lisa(fit1)

Run the code above in your browser using DataLab