
Ordinary kriging system, variances, and the exponential semivariogram
Source:R/brus_native.R
morie_kriging.RdEquations 21.4, 21.8, 21.11, 21.13, 21.23 of Brus (2022). The exponential semivariogram implements c0 + c1 (1 - exp(-h/phi)) with gamma(0) = 0: the book's own prose (95 percent of the sill at three distance parameters) pins this form; the printed exp term is a display typo.
Usage
morie_kriging(
cov_ss = NULL,
cov_s0 = NULL,
sigma2 = NA,
lam = NULL,
nu = NA,
gamma_s0 = NULL,
h = NULL,
c0 = NA,
c1 = NA,
phi = NA,
z = NULL,
mu = NULL,
cov = NULL
)Examples
# an exponential covariance on four sites along a line
sites <- c(0, 1, 2.5, 4)
sigma2 <- 2; phi <- 1.5
Cf <- function(h) sigma2 * exp(-h / phi)
C <- outer(sites, sites, function(a, b) Cf(abs(a - b)))
c0 <- Cf(abs(sites - 1.8))
k <- morie_kriging(cov_ss = C, cov_s0 = c0)
sum(k$lam) # the weights sum to one
#> [1] 1
# the prediction variance, in both of its forms
morie_kriging(lam = k$lam, cov_s0 = c0, sigma2 = sigma2, nu = k$nu)$v_ok_cov
#> [1] 0.9317601
morie_kriging(lam = k$lam, gamma_s0 = sigma2 - c0, nu = k$nu)$v_ok_gamma
#> [1] 0.9317601
# the exponential semivariogram, gamma(0) = 0
morie_kriging(h = c(0, 1, 2), c0 = 0.5, c1 = 1.5, phi = 2)$gamma_h
#> [1] 0.000000 1.090204 1.448181