newdata
using an object returned by
krige
.
predict.krige(object, newdata, se.fit=T, grid=<<see below>>, blocksize=c(1, 1), nxy=c(1, 1))
"krige"
as returned by the function
krige
.
krige
(see
attr(object,"call")
).
TRUE
, the standard errors of the predictions
are returned.
Currently the standard errors are always computed internally.
This
se.fit
only determines if the returned data frame includes
the
se
column.
krige
.
The vectors are each of length 3 and specify the minimum, maximum
and number of locations in that spatial coordinate, respectively.
A grid is then computing using
expand.grid
.
The default value is to use the range of the original location data
for the minimum and maximum, and 30 points.
This argument is ignored if
newdata
is supplied.
newdata
or
grid
are at the center
of the blocks.
1
(the default) then point kriging predictions
are computed.
se.fit = TRUE
.
This function is a method for the generic function for class krige. It can be invoked by calling for an object x of the appropriate class, or directly by calling regardless of the class of the object.
Ripley, Brian D. (1981). Spatial Statistics. Wiley, New York.
# krige the Coal Ash data kcoal <- krige(coal ~ loc(x, y) + x + x^2, data = coal.ash, covfun = spher.cov, range = 4.31, sill = 0.14, nugget = 0.89) # predictions over default 30 x 30 grid pcoal <- predict(kcoal) # plot prediction surface wireframe(fit ~ x * y, data = pcoal, screen = list(z = 300, x = -60, y = 0), drape = T) # block kriging predictions with block of size 2 x 2 at 4 locations predict(kcoal, data.frame(x=c(4,5,9,11), y=c(7,13,9,18)), blocksize=c(2,2), nxy=c(5,5))