The S function, Krig, takes data and a
covariance function and returns a Krig object that
has information about the estimate of P and Z. The simplest call making use of
all the default choices is to specify the locations, x
, and the independent variable, Y and the range for the exponential covariance function theta
. Here,
x is an n x d matrix where each row has the coordinates of the location.
Although many examples of spatial data are two-dimensional, the general
structure is not limited to the 2-d case.
The returned Krig object is the standard
best linear unbiased estimate (BLUE) of f(x) and by default the nugget variance,
, is found by GCV. If one assumes a Gaussian
process and Gaussian errors, then this estimate is also related to the
conditional expectation of f(x) given the observed data. Of equal value are
estimates of the standard errors of prediction and more will be said about these
below.
The primary flexibility of the Krig function is in specifying the
covariance function and parameters associated with it. The default covariance
is the exponential function
k(x, x') = exp( -rdist(x, x')/theta)
where rdist( x, x') is the Euclidean distance function and the default for theta
is 1. To set parameters of the covariance function to values other than their
defaults, simply include them in the calling list to
Krig. The example below
indicates how this is done.
fit <- Krig( ozone$x, ozone$y, theta=100)
View the help file for Krig to find more
information on all of the optional arguments that
can be passed into Krig. In the ozone example below, Krig could have been
called without specifying exp.cov (since this is the default).
3.2 Examples
The following examples illustrate the use of Krig and supporting functions.
Coal-ash data example.
(Data obtained from Gomez and Hazen (1970, Tables 19 and 20) on coal ash
for the Robena Mine Property in Greene County Pennsylvania.)
This is software for statistical research and not for commercial uses. The
authors do not guarantee the correctness of any function or program in this
package. Any changes to the software should not be made without the authors
permission.