spatialPredict {intamap}R Documentation

Spatial prediction

Description

spatialPredict is a generic method for spatial predictions within the intamap-package. A series of methods have been implemented, partly based on other R-packages (as krige), other methods have been developed particularly for the INTAMAP project. The object has to include a range of variables, further described in intamap-package. The prediction method is chosen based on the class of the object.

Usage

## S3 method for class 'automap':
spatialPredict(object, nsim = 0, ...)
## S3 method for class 'copula':
spatialPredict(object, ...)
## Default S3 method:
spatialPredict(object, ...)
## S3 method for class 'idw':
spatialPredict(object, ...)
## S3 method for class 'linearVariogram':
spatialPredict(object, nsim = 0, ...)
## S3 method for class 'transGaussian':
spatialPredict(object, nsim = 0, ...)
## S3 method for class 'yamamoto':
spatialPredict(object, nsim = 0, ...)

Arguments

object a list object. Most arguments necessary for interpolation are passed through this object. See intamap-package for further description of the necessary content of this variable
nsim number of simulations to return, for methods able to return simulations
... other arguments that will be passed to the requested interpolation method. See the individual interpolation methods for more information.

Details

The function spatialPredict is a wrapper around different spatial interpolation methods found within the link{intamap-package} or within other packages in R. It is for most of the methods necessary to have parameters of the correlation structure included in object to be able to carry out the spatial prediction. Below are some details about particular interpolation methods

default
a default method is not really implemented, this function is only created to give a sensible error message if the function is called with an object for which no method exist
automap
If the object already has an element variogramModel with variogram parameters, krige is called. If the this is not a part of the object, estimateParameters is called to create this element.
copula
spatial prediction using bayesCopula
idw
applies inverse distance modelling with the idp-power found by estimateParameters.idw
linearVariogram
this function estimates the process using an unfitted linear variogram; although variance is returned it can not be relied upon
transGaussian
spatial prediction using krigeTg
yamamoto
spatial prediction using yamamotoKrige

It is also possible to add to the above methods with functionality from other packages, if wanted. See description on http://www.intamap.org/newMethods.php You can also check which methods are available from other packages by calling

>methods(spatialPredict)

Value

a list object similar to object, but extended with predictions at a the set of locations defined object.

Author(s)

Jon Olav Skoien

References

http://www.intamap.org/

See Also

gstat,autoKrige, createIntamapObject, estimateParameters, intamap-package

Examples

# This example skips some steps that might be necessary for more complicated
# tasks, such as estimateParameters and pre- and postProcessing of the data
data(meuse)
coordinates(meuse) = ~x+y
meuse$value = log(meuse$zinc)
data(meuse.grid)
gridded(meuse.grid) = ~x+y
proj4string(meuse) = CRS("+init=epsg:28992")
proj4string(meuse.grid) = CRS("+init=epsg:28992")

# set up intamap object:
obj = createIntamapObject(
        observations = meuse,
        predictionLocations = meuse.grid,
        targetCRS = "+init=epsg:3035",
        params = getIntamapParams(),
        class = "linearVariogram"
)

# do interpolation step:
obj = spatialPredict(obj)  # spatialPredict.linearVariogram

[Package intamap version 1.3-3 Index]