Skip to contents

Simple kriging (beta given), universal kriging (X; default a column of ones, ordinary kriging), the GLS trend (blue), block kriging (block from BlockDiscretize or a matrix of equally weighted offsets; nugget left out of the block-block average) and local neighbourhoods (nmax, maxdist), as gstat::krige (Cressie 1993; Wackernagel 2003; Pebesma 2004). Identical to the Python arm morie.fn.krgsys.krige.

Usage

Krige(
  z,
  coords,
  new_coords,
  model,
  X = NULL,
  X0 = NULL,
  beta = NULL,
  block = NULL,
  nmax = NULL,
  maxdist = NULL,
  blue = FALSE
)

Arguments

z

Observations.

coords

Matrix of locations (any dimension).

new_coords

Matrix of targets (block centres with block).

model

Covariance model (KrigingCovariance).

X

Trend design at the data.

X0

Trend design at the targets.

beta

Known trend coefficients (simple kriging).

block

Block discretisation.

nmax

Maximum number of nearest neighbours.

maxdist

Maximum neighbour distance.

blue

Return the GLS trend.

Value

List with prediction, variance, weights, lagrange and, with a global neighbourhood and unknown trend, the GLS beta and trend_residuals.

References

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

Wackernagel, H. (2003). Multivariate Geostatistics, 3rd edn. Springer.

Pebesma, E. J. (2004). Multivariable geostatistics in S: the gstat package. Computers and Geosciences 30, 683-691.

Examples

m <- list(model = "Exp", psill = 1, range = 2, nugget = 0.1)
Krige(c(1, 3, 2), rbind(c(0, 0), c(2, 0), c(0, 2)), rbind(c(1, 1)), m)$prediction
#> [1] 2.060225