GeoKriglocWeights: Compute kriging weights (and related quantities) for Gaussian...

View source: R/GeoKriglocWeights.R

GeoKriglocWeightsR Documentation

Compute kriging weights (and related quantities) for Gaussian / non-Gaussian spatial, spatio-temporal or multivariate random fields

Description

Given a set of spatial locations (and possibly temporal instants) the function returns the vector (or matrix) of kriging weights, the covariance matrix used in the kriging system and, optionally, the inverse of the left-hand-side matrix dor a specified neighborhhod

Usage

GeoKriglocWeights(coordx, coordy=NULL, coordz=NULL, coordt=NULL, coordx_dyn=NULL,
 corrmodel, distance="Eucl", grid=FALSE, loc, neighb=NULL,
 maxdist=NULL, maxtime=NULL, method="cholesky", model="Gaussian",
 n=1, nloc=NULL, param, anisopars=NULL,
 radius=1, sparse=FALSE, time=NULL, which=1,
 copula=NULL, X=NULL, Xloc=NULL, Mloc=NULL,parallel=TRUE)

Arguments

coordx

Numeric (d\times 2) or (d\times 3) matrix of spatial coordinates. Coordinates on a sphere are accepted (lon/lat in decimal degrees) when distance = "Sphere".

coordy

Optional numeric vector giving an additional spatial coordinate dimension. Ignored if coordx is already a matrix.

coordz

Optional numeric vector giving a third spatial coordinate dimension.

coordt

Optional numeric vector of temporal coordinates (length t). If missing, a purely spatial random field is assumed.

coordx_dyn

List of m matrices (d_t\times 2) containing time-varying spatial coordinates. See GeoKrig.

corrmodel

Character string naming a valid correlation model. See GeoCovmatrix for admissible choices.

distance

Character string specifying the spatial distance. Default is "Eucl" (Euclidean). See GeoFit.

grid

Logical. If TRUE, coordinates are interpreted as defining a regular grid (see GeoKrig).

loc

Numeric (n\times 2) matrix of locations for which the kriging weights are required.

neighb

Numeric; an optional positive integer indicating the order of the neighborhood.

maxdist

Numeric; an optional positive value indicating the distance in the spatial neighborhood.

maxtime

Numeric; an optional positive integer value indicating the order of the temporal neighborhood.

method

Character string indicating the matrix factorisation used to solve the kriging system: "cholesky" (default) or "svd".

model

Character string specifying the random field type (e.g.\ "Gaussian", "SkewGaussian", "Gamma", …). See GeoFit.

n

Integer. Number of trials for Binomial random fields (default 1).

nloc

Integer. Number of trials for the prediction locations in Binomial random fields (default 1).

param

Named list of covariance and mean parameters. See CorrParam and GeoCovmatrix.

anisopars

List with components angle and ratio defining geometric anisotropy (optional).

radius

Positive numeric value: sphere radius when coordinates are lon/lat (default 1).

sparse

Logical. If TRUE, sparse‐matrix algorithms (package spam) are employed. Only effective with compactly supported covariance functions.

time

Numeric vector of length m giving the temporal instants for which weights are required. Ignored if coordt is missing.

which

Integer (1 or 2) selecting the variable whose weights are returned in the bivariate case.

copula

Character string naming a copula when a non-Gaussian dependence structure is used ("Clayton" or "Gaussian").

X

Numeric matrix of spatio-temporal covariates at data locations.

Xloc

Numeric matrix of spatio-temporal covariates at prediction locations.

Mloc

Numeric; Vector of spatio(temporal) estimated means associated to predicted locations.

parallel

Logical; if TRUE then parallelization is performed

Details

The function builds the kriging system

\Sigma \mathbf{w} = \boldsymbol{\sigma}_0

where \Sigma is the covariance matrix between observed locations and \boldsymbol{\sigma}_0 the vector of covariances between observed and prediction locations. The solution \mathbf{w} is returned together with \Sigma and, optionally, \Sigma^{-1}. Universal kriging with covariates is supported; in that case the generalised least squares estimate of the mean parameters is appended. No actual prediction is carried out; for full kriging use GeoKrig.

Value

An object of class KgWeights, a list containing:

weights

Numeric vector (or matrix) of kriging weights.

covmat

Covariance matrix \Sigma used in the kriging system.

invcov

Inverse of \Sigma (only if sparse = FALSE).

beta

Estimated regression coefficients when covariates are supplied.

type

Character string: "simple" or "universal".

model

Input model.

corrmodel

Input corrmodel.

spacetime

Logical: TRUE for spatio-temporal case, FALSE otherwise.

sparse

Logical: was a sparse algorithm used?

loc

Copy of the loc argument.

time

Copy of the time argument (if any).

Author(s)

Moreno Bevilacqua, moreno.bevilacqua@uai.cl, Víctor Morales-Oñate, victor.morales@uv.cl, Christian Caamaño-Carrillo, chcaaman@ubiobio.cl

References

Gaetan, C. and Guyon, X. (2010) Spatial Statistics and Modeling. Springer-Verlag, New York.

See Also

GeoKrig for full prediction, GeoKrigloc for local prediction, GeoCovmatrix for covariance model details,


GeoModels documentation built on Sept. 1, 2025, 1:09 a.m.