Performs spatial component analysis (SCA) on the given data and weight matrices.

SCA(X, W, n.eigen = 20, method = c("L", "M"), scaled.data = NULL, ...)

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.

n.eigen

Number of spatial components (eigenvectors) to compute. Default is 20.

method

Method used to calculate spatial cross-correlation. See SpatialXCorr.

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

  • L, using the Lee's L.

scaled.data

Centered and scaled data used for SVD. Default is NULL.

...

Additional arguments passed for eigenvalue decomposition. See eigs_sym.

Value

A list of Spatial Component Analysis results.

  • X, raw or scaled input data.

  • rotation, computed eigenvectors.

  • eigenvalues, computed eigenvalues.

  • xcor, spatial cross-correlation matrix calculated using SpatialXCorr.

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)

Examples

{
data.use <- quakes[1:100,]
W <- 1/as.matrix(dist(data.use[,1:2]))
diag(W) <- 0
sca.res <- SCA(data.use[,3:5], W, n.eigen = 2)
}