By definition w is Var( Z(s1) - Z(s2) ), where s1 and s2 are a pair of spatial
locations, and Z is the spatial process value. If Z is second-order stationary
then w only depends on the relative displacement, s1 - s2 = (dx, dy). snapKrig
models the variogram as W = 2 ( eps + psill ( 1 - cy(dy) cx(dx) ) ).
sk_vario_fun evaluates this function using the correlogram functions (cy and cx),
partial sill (psill) and nugget (eps) defined in pars, over the displacement
(dy and dx) supplied in d.
NOTE: w is twice the semi-variogram, usually denoted by greek letter gamma. Variogram
w is therefore often written 2gamma. This can (and does) lead to confusion in the
literature about whether to include a factor 2 in downstream calculations.
This function multiplies the semi-variogram function by 2, returning the variogram w
(ie 2gamma), NOT the semi-variogram.
If d is a list, its 'y' and 'x' components should supply the y and x component distances.
These must be equal-length non-negative numeric vectors. The function returns the corresponding
variogram values in a vector of the same length.
If d is a numeric vector, it is interpreted as a set of distances at which to
evaluate the range of the variogram function. Anisotropic variograms will exhibit a range
of values for a given distance (depending on the relative sizes of the x and y components).
The function returns this range in a data frame with columns 'min' and 'max'.