Skip to contents

Simple kriging with known mean beta, else ordinary kriging with the GLS mean; global neighbourhood, as gstat::krigeST with z ~ 1.

Usage

STKriging(z, coords, times, new_coords, new_times, model, beta = NULL)

Arguments

z

Observed values.

coords

Two-column matrix of observation locations.

times

Observation times.

new_coords

Two-column matrix of target locations.

new_times

Target times.

model

Space-time covariance model (STCovariance).

beta

Known mean for simple kriging.

Value

List with prediction, variance, mean.

References

Graeler, B., Pebesma, E. and Heuvelink, G. (2016). Spatio-temporal interpolation using gstat. The R Journal 8, 204-218.

Examples

m <- list(type = "separable", sill = 1, space = list(model = "Exp", range = 1),
          time = list(model = "Exp", range = 2))
STKriging(c(1, 2, 1.5), rbind(c(0, 0), c(1, 0), c(0, 1)), c(0, 0, 1), rbind(c(.5, .5)), .5, m)
#> $prediction
#> [1] 1.522804
#> 
#> $variance
#> [1] 0.725957
#> 
#> $mean
#> [1] 1.522804
#>