Kriging             package:RandomFields             R Documentation

_K_r_i_g_i_n_g _m_e_t_h_o_d_s

_D_e_s_c_r_i_p_t_i_o_n:

     The function allows for different methods of kriging.

_U_s_a_g_e:

     Kriging(krige.method, x, y=NULL, z=NULL, T=NULL, grid,
             gridtriple=FALSE, model, param, given, data, trend, pch=".")

_A_r_g_u_m_e_n_t_s:

krige.method: kriging method; currently only 'S' (simple kriging) and
          'O' (ordinary kriging) implemented.

       x: (n x d) matrix or vector of 'x' coordinates; coordinates of n
          points to be kriged

       y: vector of 'y' coordinates.

       z: vector of 'z' coordinates.

       T: vector in grid triple form for the time coordinates.

    grid: logical; determines whether the vectors 'x', 'y', and 'z'
          should be interpreted as a grid definition, see Details.

gridtriple: logical.  Only relevant if 'grid==TRUE'.  If
          'gridtriple==TRUE' then 'x', 'y', and 'z' are of the form
          'c(start,end,step)'; if 'gridtriple==FALSE' then 'x', 'y',
          and 'z' must be vectors of ascending values. 

   model: string; covariance model, see 'CovarianceFct', or type
          'PrintModelList()' to get all options.

   param: parameter vector: 'param=c(mean, variance, nugget,
          scale,...)'; the parameters must be given in this order. 
          Further parameters are to be added in case of a parametrised
          class of covariance functions, see CovarianceFct.  The value
          of 'mean' must be finite in the case of simple kriging, and
          is ignored otherwise.

   given: matrix or vector of points where data are available.

    data: the data values given at 'given'; it might be a vector or a
          matrix. If a matrix is given multivariate data are assumed
          which are kriged _separately_.

   trend: not programmed yet (will be used in case of universal
          kriging)

     pch: Kriging procedures are quite time consuming in general.  The
          character 'pch' is printed after roughly each 80th part of
          calculation.

_D_e_t_a_i_l_s:

        *  'grid==FALSE' : the vectors 'x', 'y', and 'z' are
           interpreted as vectors of coordinates

        *  '(grid==TRUE) && (gridtriple==FALSE)' : the vectors 'x',
           'y', and 'z' are increasing sequences with identical lags
           for each sequence.  A corresponding grid is created (as
           given by 'expand.grid'). 

        *  '(grid==TRUE) && (gridtriple==FALSE)' : the vectors 'x',
           'y', and 'z' are triples of the form (start,end,step)
           defining a grid (as given by
           'expand.grid(seq(x$start,x$end,x$step),
           seq(y$start,y$end,y$step), seq(z$start,z$end,z$step))')

_V_a_l_u_e:

     '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 repetitions.

_A_u_t_h_o_r(_s):

     Martin Schlather, martin.schlather@cu.lu <URL:
     http://www.cu.lu/~schlathe>

_R_e_f_e_r_e_n_c_e_s:

     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.

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

_S_e_e _A_l_s_o:

     'CondSimu', 'CovarianceFct', 'EmpiricalVariogram', 'RandomFields',

_E_x_a_m_p_l_e_s:

     ## creating random variables first
     ## here, a grid is chosen, but does not matter
     step <- 0.25 
     x <-  seq(0,7,step)
     param <- c(0,1,0,1)
     model <- "exponential"
     RFparameters(PracticalRange=FALSE)
     p <- 1:7
     points <- as.matrix(expand.grid(p,p))
     data <- GaussRF(points, grid=FALSE, model=model, param=param)

     ## visualise generated spatial data
     zlim <- c(-2.6,2.6)
     colour <- rainbow(100)
     image(p, p, xlim=range(x), ylim=range(x),
           matrix(data,ncol=length(p)),
           col=colour,zlim=zlim)

     ## now: kriging
     krige.method <- "O" ## ordinary kriging
     z <-  Kriging(krige.method=krige.method,
                   x=x, y=x, grid=TRUE,
                   model=model, param=param,
                   given=points, data=data)
     image(x,x,z,col=colour,zlim=zlim)

