ksline | R Documentation |
This function performs spatial prediction for given covariance parameters. Options implement the following kriging types: SK (simple kriging), OK (ordinary kriging), KTE (external trend kriging) and UK (universal kriging).
The function krige.conv
should be preferred, unless
moving neighborhood is to be used.
ksline(geodata, coords = geodata$coords, data = geodata$data,
locations, borders = NULL,
cov.model = "matern",
cov.pars=stop("covariance parameters (sigmasq and phi) needed"),
kappa = 0.5, nugget = 0, micro.scale = 0,
lambda = 1, m0 = "ok", nwin = "full",
n.samples.backtransform = 500, trend = 1, d = 2,
ktedata = NULL, ktelocations = NULL, aniso.pars = NULL,
signal = FALSE, dist.epsilon = 1e-10, messages)
geodata |
a list containing elements |
coords |
an |
data |
a vector with n data values. By default it takes the
component |
locations |
an |
borders |
optional. If a two column matrix defining a polygon is provided the prediction is performed only at locations inside this polygon. |
cov.pars |
a vector with 2 elements or an |
nugget |
the value of the nugget variance parameter |
micro.scale |
micro-scale variance. If different from zero, the nugget variance is divided into 2 terms: micro-scale variance and measurement error. This might affect the precision of the predictions. In practice, these two variance components are usually indistinguishable but the distinction can be made here if justifiable. |
cov.model |
string indicating the name of the model for the
correlation function. Further details in the
documentation for
|
kappa |
additional smoothness parameter required by the following correlation
functions: |
lambda |
numeric value of the Box-Cox transformation parameter.
The value |
m0 |
The default value |
nwin |
If |
n.samples.backtransform |
number of samples used in the
back-transformation. When transformations are used
(specified by an argument |
trend |
only required if |
d |
spatial dimension, |
ktedata |
only required if |
ktelocations |
only required if |
aniso.pars |
parameters for geometric anisotropy
correction. If |
signal |
logical. If |
dist.epsilon |
a numeric value. Points which are separated by a distance less than this value are considered co-located. |
messages |
logical. Indicates whether or not status messages are printed on the screen (or other output device) while the function is running. |
An object of the class
kriging
which is a list
with the following components:
predict |
the predicted values. |
krige.var |
the kriging variances. |
dif |
the difference between the predicted value and the global mean. Represents the contribution to the neighboring data to the prediction at each point. |
summary |
values of the arithmetic and weighted mean of the data and standard deviations. The weighted mean corresponds to the estimated value of the global mean. |
ktrend |
the matrix with trend if |
ktetrend |
the matrix with trend if |
beta |
the value of the mean which is implicitly estimated for
|
wofmean |
weight of mean. The predicted value is an weighted average between the global mean and the values at the neighboring locations. The value returned is the weight of the mean. |
locations |
the coordinates of the prediction locations. |
message |
status messages returned by the algorithm. |
call |
the function call. |
This is a preliminary and inefficient function implementing kriging methods.
For predictions using global neighborhood the function
krige.conv
should be used instead.
Paulo J. Ribeiro Jr. paulojus@leg.ufpr.br,
Peter J. Diggle p.diggle@lancaster.ac.uk.
Further information on the package geoR can be found at:
http://www.leg.ufpr.br/geoR/.
krige.conv
for a more efficient implementation of
conventional kriging methods,
krige.bayes
for Bayesian prediction.
loci <- expand.grid(seq(0,1,l=31), seq(0,1,l=31))
kc <- ksline(s100, loc=loci, cov.pars=c(1, .25))
par(mfrow=c(1,2))
image(kc, main="kriging estimates")
image(kc, val=sqrt(kc$krige.var), main="kriging std. errors")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.