covapprox.error {KriSp}R Documentation

Error of linear covariance approximation

Description

Evaluates different error measures of the linear covariance approximation used in the kriging approach

Usage

covapprox.error(n, cov.fun='expo.cov', cov.fun.args=list(range=1),
          taper.fun='spher.cov', taper.fun.args=list(range=1),
          hmax=taper.fun.args$range,nres=25)

Arguments

n Number of knots to evaluate the approximation
cov.fun Covariance function in the form of an R function, or its name as a string.
cov.fun.args A list with the arguments to call the covariance function (in addition to the locations).
taper.fun Taper function in the form of an R function, or its name as a string.
taper.fun.args A list with the arguments to call the taper function (in addition to the locations).
hmax Distance over which the error is calculated.
nres Resolution over which the errors are calculated.

Details

n=1000 usually gives a maximum error smaller than 0.1 percent of the total sill.

Value

A list with the elements:

max Maximum of the error.
ise Approximation of the integrated squared error.
iae Approximation of the integrated absolute error.
covapprox Linear approximation of the covariance.
error Error committed using the linear interpolation.

Note

To obtain a `small' tapering effect, the taper range can be set to a large value. In such a case, hmax should be set to the diameter of the domain.

Using the tophat function as taper, no tapering is done.

See Also

Covariance functions such as expo.cov, mater.cov, etc.

Krig.sparse and Krig.simple.sparse.

Examples

# plot the error using the default functions.
nres <- 10
n <- 25
h <- seq(0,to=1, l=n*nres)
plot( h, covapprox.error(n,nres=nres)$error, type='l')

# evaluate error for a covariance only.
expoapprox <- covapprox.error(1000,taper.fun=tophat,
               taper.fun.args=list(range=5))
# all values are negative, as expo.cov is convex.

[Package KriSp version 0.4 Index]