predict_gmSpatialModel: Predict method for objects of class 'gmSpatialModel'

PredictR Documentation

Predict method for objects of class 'gmSpatialModel'

Description

This is a one-entry function for several spatial prediction and simulation methods, for model objects of class gmSpatialModel. The several methods are chosen by means of pars objects of the appropriate class.

Usage

Predict(object, newdata, pars, ...)

predict(object, ...)

## S3 method for class 'gmSpatialModel'
predict(object, newdata, pars = NULL, ...)

## S4 method for signature 'gmSpatialModel'
predict(object, newdata, pars = NULL, ...)

## S4 method for signature 'gmSpatialModel,ANY,ANY'
Predict(object, newdata, pars, ...)

## S4 method for signature 'gmSpatialModel,ANY,gmNeighbourhoodSpecification'
Predict(object, newdata, pars, ...)

## S4 method for signature 'gmSpatialModel,ANY,gmTurningBands'
Predict(object, newdata, pars, ...)

## S4 method for signature 'gmSpatialModel,ANY,gmCholeskyDecomposition'
Predict(object, newdata, pars, ...)

## S4 method for signature 'gmSpatialModel,ANY,gmSequentialSimulation'
Predict(object, newdata, pars, ...)

## S4 method for signature 'gmSpatialModel,ANY,gmDirectSamplingParameters'
Predict(object, newdata, pars, ...)

Arguments

object

a complete "gmSpatialModel", containing conditioning data and unconditional model

newdata

a collection of locations where a prediction/simulation is desired; this is typically a sp::SpatialPoints(), a data.frame or similar of X-Y(-Z) coordinates; or perhaps for gridded data an object of class sp::GridTopology(), sp::SpatialGrid() or sp::SpatialPixels()

pars

parameters describing the method to use, enclosed in an object of appropriate class (according to the method; see below)

...

further parameters for generic functionality, currently ignored

Details

Package "gmGeostats" aims at providing a broad series of algorithms for geostatistical prediction and simulation. All can be accesses through this interface, provided that arguments object and pars are of the appropriate kind. In object, the most important criterion is the nature of its slot model. In pars its class counts: for the creation of informative parameters in the appropriate format and class, a series of accessory functions are provided as well.

Classical (gaussian-based two-point) geostatistics are obtained if object@model contains a covariance function, or a variogram model. Argument pars can be created with functions such as KrigingNeighbourhood(), SequentialSimulation(), TurningBands() or CholeskyDecomposition() to respectively trigger a cokriging, as sequential Gaussian simulation, a turning bands simulation, or a simulation via Cholesky decomposition. The kriging neighbourhood can as well be incorporated in the "gmSpatialModel" object directly, or even be nested in a "SequentialSimulation" parameter object.

Conversely, to run a multipoint geostatistics algorithm, the first condition is that object@model contains a training image. Additionally, pars must describe the characteristics of the algorithm to use. Currently, only direct sampling is available: it can be obtained by providing some parameter object created with a call to DirectSamplingParameters(). This method requires newdata to be on a gridded set of locations (acceptable object classes are sp::gridTopology, sp::SpatialGrid, sp::SpatialPixels, sp::SpatialPoints or data.frame, for the last two a forced conversion to a grid will be attempted).

Value

Depending on the nature of newdata, the result will be a data container of the same kind, extended with the predictions or simulations. For instance, if we want to obtain predictions on the locations of a "SpatialPoints", the result will be a sp::SpatialPointsDataFrame(); if we want to obtain simulations on the coordinates provided by a "data.frame", the result will be a DataFrameStack() with the spatial coordinates stored as an extra attribute; or if the input for a simulation is a masked grid of class sp::SpatialPixels(), the result will be of class sp::SpatialPixelsDataFrame() which data slot will be a DataFrameStack.

See Also

Other gmSpatialModel: as.gmSpatialModel(), gmSpatialModel-class, make.gmCompositionalGaussianSpatialModel(), make.gmCompositionalMPSSpatialModel(), make.gmMultivariateGaussianSpatialModel()


gmGeostats documentation built on April 18, 2023, 5:08 p.m.