predict.sparse {KriSp}R Documentation

Evaluation of Krig spatial process estimate

Description

Provides predictions from the spatial process estimate at arbitrary points

Usage

predict.sparse(object, x=NULL, trend.only=FALSE, ...)

Arguments

object an object of class sparse, typically the result of a call to Krig.sparse or Krig.simple.sparse.
x Matrix of x-values on which to evaluate the kriging surface. If omitted, the data x-values, i.e. obj$x will be used.
trend.only for universal kriging, should only the trend be returned.
... only for compatibility reasons.

Details

We evaluate the kriging surface on the given grid.

Value

Vector of predicted responses.

See Also

Krig.sparse, Krig.sparse; predict.surface from the fields package.

Examples

data(universal)
attach(universal.data)

obj <- Krig.sparse(x, Y,
          cov.fun.args=list(range=10,sill=.9,nugget=.1))

print( predict( obj, x=cbind(-104.5,40.5)))

xgrid <- expand.grid( lon=seq(min(x[,1]), max(x[,1]), l=50),
                      lat=seq(min(x[,2]), max(x[,2]), l=50))

# older verstions of fields used:
#   xgrid <- make.surface.grid( grid.list=list(lon='x',lat='y'),
#                           X=x, nx=50, ny=50)

surf <- predict( obj, x=xgrid)

image.plot( predict.surface(obj))
image.plot( predict.surface(obj, trend.only=TRUE))

[Package KriSp version 0.4 Index]