Calculate spatial cross-correlation matrix.

SpatialXCorr(X, W, method = c("M", "L"))

Arguments

X

A matrix with observations as rows and features as columns.

W

A weight matrix across all observations, i.e inverse of a pairwise distance matrix.

method

Method used to calculate spatial cross-correlation.

  • M, using the Wartenburg's M (Default).

  • L, using the Lee's L.

Value

A spatial cross-correlation matrix.

References

Wartenberg, D. Multivariate spatial correlation: A method for exploratory geographical analysis. Geogr. Anal. 17, 263–283 (1985)

Lee, S.-I. Developing a bivariate spatial association measure: An integration of Pearson’s r and Moran's I. J. Geogr. Syst. 3, 369–385 (2001)

See also

Examples

{
data.use <- quakes[1:100,]
W <- 1/as.matrix(dist(data.use[,1:2]))
diag(W) <- 0
M <- SpatialXCorr(data.use[,3:4], W, method = "M")
L <- SpatialXCorr(data.use[,3:4], W, method = "L")
}