For time lag u and spatial bin (b_k, b_k+1], preceded by a zero-distance
bin (the same location at two times, empty for u = 0), half the mean
squared difference of \(z(s_i, t)\) and \(z(s_j, t + u)\), as
gstat::variogramST on an STFDF.
Usage
STVariogram(z, coords, times, tlags, boundaries)
Arguments
- z
Matrix, times by locations.
- coords
Two-column matrix of locations.
- times
Time values.
- tlags
Integer time lags.
- boundaries
Spatial bin boundaries.
Value
Data frame with gamma, np, dist,
timelag, spacelag.
Examples
z <- rbind(c(1, 2, 4), c(2, 2.5, 3))
STVariogram(z, cbind(0:2, 0), 0:1, tlags = 0:1, boundaries = c(0, 1.5, 3))
#> gamma np dist timelag spacelag
#> 1 NaN 0 NaN 0 0.00
#> 2 0.6875 4 1 0 0.75
#> 3 2.5000 2 2 0 2.25
#> 4 0.3750 3 0 1 0.00
#> 5 0.6875 4 1 1 0.75
#> 6 2.0000 2 2 1 2.25