Skip to contents

Solves the ordinary-kriging system \([[Gamma, 1], [1', 0]] [lambda; mu] = [gamma_0; 1]\) at each prediction location, where Gamma_ij is the semivariance between observed locations and gamma_0 the semivariance between the observed locations and the target. The unbiasedness constraint sum(lambda) = 1 is the last row of the system.

Usage

Krig(
  known_coords,
  known_values,
  predict_coords,
  nugget = 0,
  sill = 1,
  range_ = 1
)

Arguments

known_coords

Matrix of observed locations, one row per point.

known_values

Observed values, one per row of known_coords.

predict_coords

Matrix of prediction locations.

nugget

Variogram nugget. Default 0.

sill

Variogram sill. Default 1.

range_

Variogram range. Default 1.

Value

List with estimate (predictions), predictions, variances, nugget, sill, range, n_known, n_predict, method.

Details

Formula: gamma(h) = 0 for h = 0; nugget + (sill - nugget) * (1.5 h/a - 0.5 (h/a)^3) for 0 < h <= a; sill for h > a.

References

Matheron (1963), Principles of geostatistics, Economic Geology 58(8):1246-1266, doi:10.2113/gsecongeo.58.8.1246 ; Cressie (1993), Statistics for Spatial Data, rev. ed., Wiley.

Examples

Krig(known_coords = c(1, 2, 3, 4, 5, 6, 7, 8), known_values = c(1, 2, 3, 4, 5, 6, 7, 8),
  predict_coords = c(1, 2, 3, 4, 5, 6, 7, 8))
#> $estimate
#> [1] 1 2 3 4 5 6 7 8
#> 
#> $predictions
#> [1] 1 2 3 4 5 6 7 8
#> 
#> $variances
#> [1]  0.000000e+00  0.000000e+00  0.000000e+00  5.204170e-17 -3.330669e-16
#> [6] -1.014813e-16 -7.401487e-17  2.918961e-16
#> 
#> $nugget
#> [1] 0
#> 
#> $sill
#> [1] 1
#> 
#> $range
#> [1] 1
#> 
#> $n_known
#> [1] 8
#> 
#> $n_predict
#> [1] 8
#> 
#> $method
#> [1] "Ordinary kriging, spherical variogram (Matheron 1963)"
#> 
#> attr(,"class")
#> [1] "morie_rich_result" "list"