The values of x
will automatically be centered first with z = scale(x, center = TRUE, scale = scale)
(with user control over the scale
argument). The LISA values are the product of each z
value with the weighted sum of their respective surrounding value: $$I_i = z_i \sum_j w_{ij} z_j$$ (or in R code: lisa = z * (w %*% z)
). These are for exploratory analysis and model diagnostics.
An above-average value (i.e. positive z-value) with positive mean spatial lag indicates local positive spatial autocorrelation and is designated type "High-High"; a low value surrounded by high values indicates negative spatial autocorrelation and is designated type "Low-High", and so on.
This function uses Equation 7 from Anselin (1995). Note that the spdep
package uses Formula 12, which divides the same value by a constant term \(\sum_i z_i^2/n\). So the geostan
version can be made equal to the spdep
version by dividing by that value.