np.kriging {npsp} | R Documentation |
Nonparametric (residual) kriging
Description
Compute simple kriging or residual kriging predictions (and also the corresponding simple kriging standard errors ). Currently, only global (residual) simple kriging is implemented.
Usage
np.kriging(object, ...)
## Default S3 method:
np.kriging(
object,
svm,
lp.resid = NULL,
ngrid = object$grid$n,
intermediate = FALSE,
...
)
## S3 method for class 'np.geo'
np.kriging(object, ngrid = object$grid$n, intermediate = FALSE, ...)
kriging.simple(x, y, newx, svm, intermediate = FALSE)
Arguments
object |
object used to select a method:
local polynomial estimate of the trend (class |
... |
further arguments passed to or from other methods. |
svm |
semivariogram model (of class extending |
lp.resid |
residuals (defaults to |
ngrid |
number of grid nodes in each dimension. |
intermediate |
logical, determines whether the intermediate computations
are included in the output (component |
x |
vector/matrix with data locations (each component/row is an observation location). |
y |
vector of data (response variable). |
newx |
vector/matrix with the (irregular) locations to predict
(each component/row is a prediction location).
or an object extending |
Value
np.kriging()
, and kriging.simple()
when newx
defines
gridded data (extends grid.par
or data.grid
classes),
returns an S3 object of class krig.grid
(kriging results + grid par.).
A data.grid
object with the additional (some optional) components:
kpred |
vector or array (dimension |
ksd |
vector or array with the kriging standard deviations. |
kriging |
(if requested) a list with 4 components:
|
When newx
is a matrix of coordinates (where each row is a prediction location),
kriging.simple()
returns a list with the previous components (kpred
, ksd
and, if requested, kriging
).
See Also
Examples
geomod <- np.fitgeo(aquifer[,1:2], aquifer$head)
krig.grid <- np.kriging(geomod, ngrid = c(96, 96)) # 9216 locations
old.par <- par(mfrow = c(1,2))
simage(krig.grid, 'kpred', main = 'Kriging predictions',
xlab = "Longitude", ylab = "Latitude", reset = FALSE )
simage(krig.grid, 'ksd', main = 'Kriging sd', xlab = "Longitude",
ylab = "Latitude" , col = hot.colors(256), reset = FALSE)
par(old.par)