spatial_cor | R Documentation |
This function calculate some spatial autocorrelations for a sample of networks at different orders (distances).
spatial_cor(
A,
V,
measures = c("covariance", "correlation", "moran", "geary"),
mean = TRUE,
diag = FALSE,
distance1 = TRUE,
rowstand = FALSE,
scale = FALSE
)
A |
A symmetric matrix |
V |
A vector |
measures |
Whether to use the Covariance |
mean |
Whether to use the mean of the vector for the measures |
diag |
Whether to consider the diagonal of the matrix for the measures |
distance1 |
Whether to return only the spatial autocorrelation considering the actor at distance 1 |
rowstand |
Whether to use the row-standardization to estimate Moran I (Anselin, 1995) |
scale |
Whether to scale Moran I (Anselin, 1995) |
This function return the global spatial autocorrelation. Multiple orders can also be computed.
Anselin, L. (1995). Local indicators of spatial association—LISA. Geographical analysis, 27(2), 93-115.
Geary, R.C. (1954). “The Contiguity Ratio and Statistical Mapping.” The Incorporated Statistician, 5: 115-145.
Moran, P.A.P. (1950). “Notes on Continuous Stochastic Phenomena.” Biometrika, 37: 17-23.
A <- matrix(c(
0, 0, 1, 1,
0, 0, 1, 0,
1, 0, 0, 0,
1, 0, 1, 0
), byrow = TRUE, ncol = 4)
V <- c(2, 2, 1, 1)
spatial_cor(A, V, measures = c("moran"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.