LmcCovariance: cross-covariance matrix \(C(h) = \sum_s B_s
\rho_s(h)\) of a linear model of coregionalization (a single structure is
the intrinsic coregionalization model). LmcCokriging: ordinary
cokriging (one unbiasedness constraint per variable, as gstat) or simple
cokriging (known means) of heterotopic data in any dimension, with the
cokriging weights. Identical to the Python arm morie.fn.lmckrige.
Usage
LmcCovariance(h, lmc)
LmcCokriging(z, coords, var, new_coords, lmc, target = 0L, means = NULL)Arguments
- h
Distance.
- lmc
List of structures, each a list with
model(Exp, Gau, Sph, Mat, Nug),range, optionalkappaand a symmetric p by p matrixB.- z
Observations.
- coords
Matrix of observation coordinates (any dimension).
- var
Variable of each observation (0-based).
- new_coords
Matrix of target coordinates.
- target
Variable to predict (0-based).
- means
Known means (simple cokriging), or NULL.
References
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
lmc <- list(list(model = "Exp", range = 2, B = matrix(c(1, 0.6, 0.6, 1), 2)))
LmcCovariance(1, lmc)
#> [,1] [,2]
#> [1,] 0.6065307 0.3639184
#> [2,] 0.3639184 0.6065307
LmcCokriging(c(1, 2, 1.5, 0.5), rbind(c(0, 0), c(2, 0), c(1, 0), c(0, 1)), c(0, 0, 1, 1),
rbind(c(1, 1)), lmc)$prediction
#> [1] 1.426632
