Skip to contents

StGetisOrd: Getis-Ord \(G_i^*\) z-scores of a space-time cube (rows are times) with binary neighbourhoods of locations within distance (self included) and times within time_window (Ord and Getis 1995), as spdep::localG on the space-time neighbours. BivariateMoran: \(I_B = \sum x_i (Wy)_i / \sum x_i^2\) of standardised variables with local terms and a permutation p-value, as spdep::moran_bv. StTrendSurface: least-squares polynomial trend in centred coordinates and time. Identical to the Python arm morie.fn.stlocal.

Usage

StGetisOrd(z, coords, distance, time_window = 1L)

BivariateMoran(x, y, W, nsim = 499L, seed = 1)

StTrendSurface(z, coords, times, degree = 2L, time_degree = 1L)

Arguments

z

Matrix (times by locations) or vector (StTrendSurface).

coords

Two-column coordinates.

distance

Spatial neighbourhood radius.

time_window

Temporal neighbourhood half-width.

x, y

Variables.

W

Spatial weights matrix.

nsim

Permutations.

seed

Philox seed.

times

Times.

degree, time_degree

Polynomial degrees in space and time.

Value

List.

References

Ord, J. K. and Getis, A. (1995). Local spatial autocorrelation statistics: distributional issues and an application. Geographical Analysis 27, 286-306.

Wartenberg, D. (1985). Multivariate spatial correlation: a method for exploratory geographical analysis. Geographical Analysis 17, 263-283.

Krumbein, W. C. (1959). Trend surface analysis of contour-type maps with irregular control-point spacing. Journal of Geophysical Research 64, 823-834.

Examples

W <- rbind(c(0, 1, 0, 0), c(0.5, 0, 0.5, 0), c(0, 0.5, 0, 0.5), c(0, 0, 1, 0))
BivariateMoran(1:4, 1:4, W, nsim = 9)$statistic
#> [1] 0.4