lisa.nc {ncf} | R Documentation |
Non-centered indicators of spatial association
Description
lisa.nc
is a function to estimate the (non-centred) multivariate local indicators of spatial association. The function requires multiple observations at each location. For single observations at each location use lisa
.
Usage
lisa.nc(
x,
y,
z,
neigh,
na.rm = FALSE,
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 |
a matrix of dimension n x p representing p (>1) observation at each location. |
neigh |
neighborhood size. |
na.rm |
If TRUE, NA's will be dealt with through pairwise deletion of missing values. |
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 (non-centered) local indicators of spatial association modified form Anselin (1995). 'correlation' is the average correlation within a neighborhood. The function requires multiple observations at each location.
Missing values are allowed – values are assumed missing at random, and pairwise complete observations will be used.
Value
An object of class "lisa" is returned, consisting of the following components:
correlation |
the mean correlation within the neighborhood (neigh). |
p |
the permutation two-sided p-value for each distance-class. |
n |
the number of pairs within each neighborhood. |
dmean |
the actual mean of distance within each neighborhood. |
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
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 <- cbind(
rmvn.spa(x = x, y = y, p = 2, method = "exp"),
rmvn.spa(x = x, y = y, p = 2, method = "exp")
)
# lisa.nc analysis
fit1 <- lisa.nc(x = x, y = y, z = z, neigh = 3)
## Not run: plot(fit1)