predict.gstatModel-method {GSIF} | R Documentation |

`"gstatModel"`

Predicts from an object of class `gstatModel-class`

using new prediction locations. The function combines predictions by regression (e.g. GLM) and interpolation of residuals (kriging) via the Regression-Kriging (RK) or Kriging with External Drift (KED, also known as Universal Kriging) framework.

## S4 method for signature 'gstatModel' predict(object, predictionLocations, nmin = 10, nmax = 30, debug.level = -1, predict.method = c("RK", "KED"), nfold = 5, verbose = FALSE, nsim = 0, mask.extra = TRUE, block, zmin = -Inf, zmax = Inf, subsample = length(object@sp), coarsening.factor = 1, vgmmodel = object@vgmModel, subset.observations = !is.na(object@sp@coords[,1]), betas = c(0,1), extend = .5, ...) ## S4 method for signature 'list' predict(object, predictionLocations, nmin = 10, nmax = 30, debug.level = -1, predict.method = c("RK", "KED"), nfold = 5, verbose = FALSE, nsim = 0, mask.extra = TRUE, block, zmin = -Inf, zmax = Inf, subsample = length(object@sp), ...)

`object` |
object of type |

`predictionLocations` |
object of type |

`nmin` |
integer; minimum number of nearest observations sent to |

`nmax` |
integer; maximum number of nearest observations sent to |

`debug.level` |
integer; default debug level mode sent to |

`predict.method` |
character; mathematical implementation of the |

`nfold` |
integer; n-fold cross validation sent to |

`verbose` |
logical; specifies whether to supress the progress bar of the |

`nsim` |
integer; triggers the geostatistical simulations |

`mask.extra` |
logical; specifies whether to mask out the extrapolation pixels (prediction variance exceeding the global variance) |

`block` |
numeric; support size (block support for objects of type |

`zmin` |
numeric; lower physical limit for the target variable |

`zmax` |
numeric; upper physical limit for the target variable |

`subsample` |
integer; sub-sample point observations to speed up the processing |

`coarsening.factor` |
integer; coarsening factor (1:5) to speed up the processing |

`vgmmodel` |
object of class |

`subset.observations` |
logical; vector specifying the subset of observations used for interpolation |

`extend` |
numeric; fraction of the range for which the spatial domain should be extended when searching for observations for kriging |

`betas` |
numeric; vector of the beta coefficients to be passed to the |

`...` |
other optional arguments that can be passed to |

Selecting `predict.method = "KED"`

invokes simple kriging with external drift with betas set at 0 (intercept) and 1 (regression predictions used as the only covariate). This assumes that the regression model already results in an unbiased estimator of the trend model.

If not speficied otherwise, `subset.observations`

by default selects only obserations within the spatial domain (bounding box) of the `predictionLocations`

plus 50% of the one third of the extent of the area (`extend`

). In the case of spatial duplicates in 2D or 3D, `subset.observations`

will automatically remove all duplicates before running kriging. All points in 3D that stand exactly above each other will be removed by default.

Predictions can be speed up by using a larger `coarsening.factor`

e.g. 2 to 5, in which case the ordinary kriging on residuals will run at a coarser resolution, and the output would be then downscaled to the original resolution using splines (via the `warp`

method). In the case of `predict.method = RK`

, the kriging variance is derived as a sum of the GLM variance and the OK variance, which is statistically sub-optimal.

Predictions using `predict.method = "KED"`

(the default gstat setting) can be time consuming for large data set and can result in instabilities (singular matrix problems) if the search radius is small and/or if all covariates contain exactly the same values. Predictions using `predict.method = "RK"`

on the other hand can be speed up, but will typically underestimate the prediction variance (taken as a simple sum of the regression and ordinary kriging variances). Compare to the "KED" variance that includes also a cross-term (see Hengl et al. 2007 for more details).

Tomislav Hengl, Gerard B.M. Heuvelink and Bas Kempen

Hengl T., Heuvelink G.B.M., Rossiter D.G., 2007. About regression-kriging: from equations to case studies. Computers and Geosciences, 33(10): 1301-1315.

`gstatModel-class`

, `fit.gstatModel`

[Package *GSIF* version 0.5-5 Index]