"predictSurface"(object, grid.list = NULL, extrap = FALSE, chull.mask = NA, nx = 80, ny = 80, xy = c(1,2), verbose = FALSE, ...)
"predictSurface"(object, grid.list = NULL, extrap = FALSE, chull.mask = NA, nx = 80, ny = 80, xy = c(1,2), verbose = FALSE, ...)
"predictSurface"(object, grid.list = NULL, extrap = FALSE, chull.mask = NA,
nx = 80, ny = 80, xy = c(1, 2), verbose = FALSE, ZGrid = NULL, drop.Z = FALSE, just.fixed=FALSE, ...)
"predictSurface"(object, ...)
"predictSurfaceSE"( object, grid.list = NULL, extrap =
FALSE, chull.mask = NA, nx = 80, ny = 80, xy = c(1,2), verbose =
FALSE, ...)
"predict"(object,...)
fields.x.to.grid
.)
FALSE
(the
default) the predictions will be restricted to the convex hull of the observed
data or the convex hull defined from the points from the argument chull.mask.
This function may be slightly faster if this logical is set to
TRUE
to avoid checking the grid points for membership in the
convex hull. For more complicated masking a low level creation of a bounding
polygon and testing for membership with in.poly
may be useful. xy= c(2,4)
will evaluate a surface using the
second and fourth variables with variables 1 and 3 fixed at their median
values. NOTE: this argument is ignored if a grid.list argument is
passed.
grid.list
argument. e.g. ZGrid and grid.list describe the same
grid.
If ZGrid is an array then the first two indices are the x and y
locations in the
grid. The third index, if present, indexes the covariates. e.g. For
evaluation on
a 10X15 grid and with 2 covariates. dim( ZGrid) == c(10,15, 2)
.
If ZGrid is a list then the components x and y shold match those of
grid.list and
the z component follows the shape described above for the no list
case.
predictSurface.derivative
the component z
is a three
dimensional array with nx
, ny
, 2.
in.poly
is used. The argument
inflation in this function is used to include a small margin around
the outside of the polygon so that point on convex hull are
included. This potentially confusing modification is to prevent
excluding grid points that fall exactly on the ranges of the
data. Also note that as written there is no computational savings for
evaluting only the convex subset compared to the full grid.predictSurface.fastTps
is a specific version ( m=2, and k=2)
that can be much more efficient because it takes advantage of a low
level FORTRAN call to evaluate the Wendland covariance function. Use
predictSurface
or predict
for other choices of m and k.
predictSurface.Krig
is designed to also include covariates for the fixed in terms of grids. Due to similarity in output and the model. predictSurface.mKrig
just uses the Krig method.
NOTE: predict.surface
has been depreciated and just prints out
a warning when called.
fit<- Tps( BD[,1:4], BD$lnya) # fit surface to data
# evaluate fitted surface for first two
# variables holding other two fixed at median values
out.p<- predictSurface(fit)
surface(out.p, type="C")
#
# plot surface for second and fourth variables
# on specific grid.
glist<- list( KCL=29.77, MgCl2= seq(3,7,,25), KPO4=32.13,
dNTP=seq( 250,1500,,25))
out.p<- predictSurface(fit, glist)
surface(out.p, type="C")
out.p<- predictSurfaceSE(fit, glist)
surface(out.p, type="C")
Run the code above in your browser using DataLab