Skip to contents

Global and local spatial autocorrelation on a lattice in spdep conventions; R arm of the Python modules morie.fn.lac*. Lacgear: Geary's C with randomisation or normality moments (spdep::geary.test). Lacgetg: global Getis-Ord G (spdep::globalG.test). Lacgmc: Geary's C permutation test, permutations as the order of Philox uniforms, pseudo p-value (1 + number of permuted C at most C) / (nsim + 1). Laclisa: local Moran's \(I_i\) with the conditional randomisation moments (spdep::localmoran defaults). Laclihh, Laclihl: significant high-high clusters and high-low outliers. Laclimc: conditional permutation pseudo p-values of \(I_i\), folded (1 + smaller count of permuted values at least or at most the observed one) / (nsim + 1). Lacscat: Moran scatterplot quadrants (1 HH, 2 LH, 3 LL, 4 HL) and slope. Lacscor: correlation of y with Wy and Lee's \(L_{yy}\). Lacbivl: Lee's bivariate L (spdep::lee). Lactest: Moran, Geary and Getis-Ord global tests. Lacvgm: Matheron semivariogram with gstat default bins.

Usage

Lacgear(y, W, randomisation = TRUE)

Lacgetg(y, W)

Lacgmc(y, W, nsim = 99, seed = 0)

Laclisa(y, W)

Laclihh(y, W, p_thr = 0.05)

Laclihl(y, W, p_thr = 0.05)

Laclimc(y, W, nsim = 99, seed = 0)

Lacscat(y, W)

Lacscor(y, W)

Lacbivl(x, y, W)

Lactest(y, W)

Lacvgm(y, coords, n_lags = 15, cutoff = NULL)

Arguments

y

Variable on the n units.

W

Spatial weights matrix (zero diagonal).

randomisation

Randomisation (TRUE) or normality variance.

nsim

Number of permutations.

seed

Philox seed.

p_thr

Significance threshold for the local tests.

x

Second variable (Lacbivl).

coords

n x 2 matrix of unit coordinates.

n_lags

Number of distance bins.

cutoff

Largest distance considered (default one third of the bounding-box diagonal).

Value

A list whose statistic is the headline value, with the components of the Python result.

References

Cliff, A. D. and Ord, J. K. (1981). Spatial Processes: Models and Applications. Pion, London.

Geary, R. C. (1954). The contiguity ratio and statistical mapping. The Incorporated Statistician 5, 115-145.

Getis, A. and Ord, J. K. (1992). The analysis of spatial association by use of distance statistics. Geographical Analysis 24, 189-206.

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

Sokal, R. R., Oden, N. L. and Thomson, B. A. (1998). Local spatial autocorrelation in a biological model. Geographical Analysis 30, 331-354.

Lee, S.-I. (2001). Developing a bivariate spatial association measure. Journal of Geographical Systems 3, 369-385.

Cressie, N. (1993). Statistics for Spatial Data. Wiley, New York.

Examples

W <- 1 * (abs(outer(1:6, 1:6, "-")) == 1)
W <- W / rowSums(W)
y <- c(1, 2.4, 1.3, 3.1, 1.9, 2.2)
Lacgear(y, W)$statistic
#> [1] 1.284384
Laclisa(y, W)$local_values
#> [1] -0.84527221 -0.71633238 -1.08080229 -0.88309456 -0.11461318 -0.03724928
Lactest(y, W)$p_value
#> [1] 0.8536784