# RFinterpolate: Interpolation methods In RandomFields: Simulation and Analysis of Random Fields

## Description

The function allows for different methods of interpolation. Currently, only various kinds of kriging are installed.

## Usage

 1 2 3 RFinterpolate(model, x, y = NULL, z = NULL, T = NULL, grid=NULL, distances, dim, data, given=NULL, params, err.model, err.params, ignore.trend = FALSE, ...)

## Arguments

 model,params \argModel x \argX y,z \argYz T \argT grid \argGrid distances,dim \argDistances data \argData \argDataGiven If the argument x is missing, data may contain NAs, which are then replaced through imputing. given \argGiven err.model,err.params For conditional simulation and random imputing only. \argErrmodel ignore.trend logical. If TRUE only the covariance model of the given model is considered, without the trend part. ... \argDots

## Details

In case of repeated data, they are kriged separately; if the argument x is missing, data may contain NAs, which are then replaced by the kriged values (imputing);

In case of intrinsic cokriging (intrinsic kriging for multivariate random fields) the pseudo-cross-variogram is used (cf. Ver Hoef and Cressie, 1991).

## Value

The value depends on the additional argument variance.return, see RFoptions.

If variance.return=FALSE (default), Kriging returns a vector or matrix of kriged values corresponding to the specification of x, y, z, and grid, and data.

data: a vector or matrix with one column
* grid=FALSE. A vector of simulated values is returned (independent of the dimension of the random field)
* grid=TRUE. An array of the dimension of the random field is returned (according to the specification of x, y, and z).

data: a matrix with at least two columns
* grid=FALSE. A matrix with the ncol(data) columns is returned.
* grid=TRUE. An array of dimension d+1, where d is the dimension of the random field, is returned (according to the specification of x, y, and z). The last dimension contains the realisations.

If variance.return=TRUE, a list of two elements, estim and var, i.e. the kriged field and the kriging variances, is returned. The format of estim is the same as described above. The format of var is accordingly.

## Note

Important options are

• method (overwriting the automatically detected variant of kriging)

• return_variance (returning also the kriging variance)

• locmaxm (maximum number of conditional values before neighbourhood kriging is performed)

• fillall imputing estimates location by default

• varnames and coordnames in case data.frames are used to tell which column contains the data and the coordinates, respectively.

## Author(s)

\martin

; \marco

#### Author(s) of the code:

\martin

; Alexander Malinowski; \marco

## References

Chiles, J.-P. and Delfiner, P. (1999) Geostatistics. Modeling Spatial Uncertainty. New York: Wiley.

Cressie, N.A.C. (1993) Statistics for Spatial Data. New York: Wiley.

Goovaerts, P. (1997) Geostatistics for Natural Resources Evaluation. New York: Oxford University Press.

Ver Hoef, J.M. and Cressie, N.A.C. (1993) Multivariate Spatial Prediction. Mathematical Geology 25(2), 219-240.

Wackernagel, H. (1998) Multivariate Geostatistics. Berlin: Springer, 2nd edition.