predict.se.Krig {fields} | R Documentation

## Standard errors of predictions for Krig spatial process estimate

### Description

Finds the standard error ( or covariance) of prediction based on a linear combination of the observed data. The linear combination is usually the "Best Linear Unbiased Estimate" (BLUE) found from the Kriging equations. There are also provisions to use a different covariance for evaluation than the one used to define the BLUE.

### Usage

    ## S3 method for class 'Krig':
    predict.se(object, x = NULL, cov = FALSE, verbose = FALSE,...)

### Arguments

`object` | A Krig object.
`x` | Points to compute the predict standard error or the prediction cross covariance matrix.
`cov` | If TRUE the full covariance matrix for the predicted values is returned. Make sure this will not be big if this option is used. ( e.g. 50X50 grid will return a matrix that is 2500X2500!) If FALSE just the marginal standard deviations of the predicted values are returned. Default is FALSE – of course.
`verbose` | If TRUE will print out various information for debugging.
`...` | These additional arguments passed to the predict.se function.

### Details

The predictions are represented as a linear combination of the dependent variable, Y. Call this LY. Based on this representation the conditional variance is the same as the expected value of (P(x) + Z(X) - LY)**2. where P(x)+Z(x) is the value of the surface at x and LY is the linear combination that estimates this point. Finding this expected value is straight forward given the unbiasedness of LY for P(x) and the covariance for Z and Y.

In these calculations it is assumed that the covariance parameters are fixed. This is an approximation since in most cases they have been estimated from the data. It should also be noted that if one assumes a Gaussian field and known parameters in the covariance, the usual Kriging estimate is the conditional mean of the field given the data. This function finds the conditional standard deviations (or full covariance matrix) of the fields given the data.

There are two useful extensions supported by this function. Adding the variance to the estimate of the spatial mean if this is a correlation model. (See help file for Krig) and calculating the variances under covariance misspecification. The function `predict.se.KrigA` uses the A matrix to find the standard errors or covariances directly from the linear combination of the spatial predictor. Currently this is also the calculation in `predict.se.Krig` although a shortcut using the Kriging equations is planned for a later verion of fields.

### Value

A vector of standard errors for the predicted values of the Kriging fit.

### See Also

Krig, predict.Krig, predict.surface.se

### Examples

    #
    # Note: in these examples predict.se will default to predict.se.Krig using
    # a Krig object

      fit<- Krig(ozone$x,ozone$y,cov.function="Exp.cov", theta=10)    # Krig fit
      predict.se.Krig(fit)      # std errors of predictions at obs.

    # make a  grid of X's
      xg<-make.surface.grid(
      list(East.West=seq(-27,34,,20),North.South=seq(-20,35,,20)))
      out<- predict.se.Krig(fit,xg)   # std errors of predictions

    #at the grid points out is a vector of length 400
    #reshape the grid points into a 20X20 matrix etc.

       out.p<-as.surface( xg, out)
       surface( out.p, type="C")

    # this is equivalent to  the single step function
    # (but default is not to extrapolation beyond data
    # out<- predict.surface.se( fit)
    # image.plot( out)

[Package fields version 5.02 Index]