Learn R Programming

gstat (version 1.0-21)

krigeST: Ordinary global Spatio-Temporal Kriging

Description

Function for ordinary global spatio-temporal kriging on point support

Usage

krigeST(formula, data, newdata, modelList, y, nmax = Inf, stAni = NULL,
        computeVar = FALSE,	fullCovariance = FALSE,
        checkNeighbourhood=TRUE, bufferNmax=4, progress=TRUE)

Arguments

formula
formula that defines the dependent variable as a linear model of independent variables; suppose the dependent variable has name z, for ordinary and simple kriging use the formula z~1; for simple kriging also define be
data
ST object: should contain the dependent variable and independent variables.
newdata
ST object with prediction/simulation locations in space and time; should contain attribute columns with the independent variables (if present).
modelList
list with named elements: space, time and/or joint depending on the spatio-temporal covariance family and an entry stModel. Currently implemented families that may be used for stModel are separable, productSum, met
y
matrix; to krige multiple fields in a single step, pass data as columns of matrix y. This will ignore the value of the response in formula.
nmax
The maximum number of neighbouring locations for a spatio-temporal local neighbourhood
stAni
a spatio-temporal anisotropy scaling assuming a metric spatio-temporal space. Used only for the selection of the closest neighbours. This scaling needs only to be provided in case the model does not have a stAni parameter, or if a different one should be
...
further arguments (currently unused)
computeVar
logical; if TRUE, prediction variances will be returned
fullCovariance
logical; if FALSE a vector with prediction variances will be returned, if TRUE the full covariance matrix of all predictions will be returned
checkNeighbourhood
whether the fast neareat neighbour search shall be extended and being reduced based on the actual covariance
bufferNmax
factor with which nmax is multiplied for an extended search radius (default=4).
progress
whether a progress bar shall be printed for local spatio-temporal kriging; default=TRUE

Value

  • An object of the same class as newdata (deriving from ST). Attributes columns contain prediction and prediction variance.

Details

Function krigeST is a R implementation of the kriging function from gstat using spatio-temporal covariance models following the implementation of krige0. Function krigeST offers some particular methods for ordinary spatio-temporal (ST) kriging. In particular, it does not support block kriging or kriging in a distance-based neighbourhood, and does not provide simulation.

References

N.A.C. Cressie, 1993, Statistics for Spatial Data, Wiley.

http://www.gstat.org/

Pebesma, E.J., 2004. Multivariable geostatistics in S: the gstat package. Computers & Geosciences, 30: 683-691.

See Also

krige0, gstat, predict.gstat

Examples

Run this code
library(sp)
library(spacetime)
sumMetricVgm <- vgmST("sumMetric",
                      space=vgm( 4.4, "Lin", 196.6,  3),
                      time =vgm( 2.2, "Lin",   1.1,  2),
                      joint=vgm(34.6, "Exp", 136.6, 12),
                      stAni=51.7)

data(air)

rr <- rural[,"2005-06-01/2005-06-03"]
rr <- as(rr,"STSDF")

x1 <- seq(from=6,to=15,by=1)
x2 <- seq(from=48,to=55,by=1)

DE_gridded <- SpatialPoints(cbind(rep(x1,length(x2)), rep(x2,each=length(x1))), 
                            proj4string=CRS(proj4string(rr@sp)))
gridded(DE_gridded) <- TRUE
DE_pred <- STF(sp=as(DE_gridded,"SpatialPoints"), time=rr@time)
DE_kriged <- krigeST(PM10~1, data=rr, newdata=DE_pred,
                     modelList=sumMetricVgm)
gridded(DE_kriged@sp) <- TRUE
stplot(DE_kriged)

Run the code above in your browser using DataLab