View source: R/GeoKriglocWeights.R
| GeoKriglocWeights | R Documentation |
Given a set of spatial locations (and possibly temporal instants), the function
computes local Gaussian kriging weights for each requested prediction task using
a neighborhood selected from the observations. Non-Gaussian local prediction is
implemented by GeoKrigloc, not by this low-level weights helper.
GeoKriglocWeights(coordx=NULL, coordy=NULL, coordz=NULL, coordt=NULL, coordx_dyn=NULL,
corrmodel, distance="Eucl", grid=FALSE, loc, neighb=NULL,
maxdist=NULL, maxtime=NULL, method="cholesky", model="Gaussian",
n=1, nloc=NULL, param, anisopars=NULL,
radius=1, sparse=FALSE, time=NULL, which=1,
copula=NULL, X=NULL, Xloc=NULL, Mloc=NULL,parallel=FALSE,
ncores=6, compact=FALSE)
coordx |
Numeric ( |
coordy |
Optional numeric vector giving an additional spatial coordinate
dimension. Ignored if |
coordz |
Optional numeric vector giving a third spatial coordinate dimension. |
coordt |
Optional numeric vector containing the temporal coordinates of the observations. If missing, a purely spatial random field is assumed. Temporal coordinates may be irregularly spaced; temporal lags are computed from the supplied coordinate values. |
coordx_dyn |
List of one two- or three-column observation-coordinate matrix per temporal instant. Blocks are concatenated by time; rows within each block retain their matrix order. See |
corrmodel |
Character string naming a valid correlation model.
See |
distance |
Character string specifying the spatial distance.
Default is |
grid |
Logical. If |
loc |
Numeric ( |
neighb |
Numeric; an optional positive integer indicating the order of the neighborhood. |
maxdist |
Numeric; an optional positive value indicating the distance in the spatial neighborhood. |
maxtime |
Numeric; an optional non-negative maximum temporal-distance threshold, expressed in the same units as |
method |
Character string indicating the matrix factorisation
used to solve the kriging system: |
model |
Character string. The validated public implementation currently
requires |
n |
Integer. Number of trials for Binomial random fields
(default |
nloc |
Integer. Number of trials for the prediction locations
in Binomial random fields (default |
param |
Named list of covariance and mean parameters.
See |
anisopars |
List with components |
radius |
Positive numeric value: sphere radius when
coordinates are lon/lat (default |
sparse |
Logical. If |
time |
Numeric vector giving the temporal instants for which weights are required. Values need not be equally spaced and are interpreted on the same numeric time scale as |
which |
Integer ( |
copula |
Must be |
X |
Numeric design matrix at observation locations. Fixed-location observations are ordered time then site; dynamic observations are ordered by the temporal blocks of |
Xloc |
Numeric design matrix at prediction tasks, ordered location then time: all requested times for the first row of |
Mloc |
Numeric vector of known prediction means in the same location-major order as |
parallel |
Logical; default |
ncores |
Positive integer or |
compact |
Logical. If |
The optional pair cache is bounded by
getOption("GeoModels.local_pair_cache_max_bytes", 256 * 1024^2).
This is a per-process budget in bytes for native cache workspace and CSR output,
not a limit on total R memory. The peak during hash growth is included.
A zero budget disables cache construction. If the budget or integer-index
limit would be exceeded, the uncached calculation is used automatically.
Each parallel worker may hold its own R objects.
Mean inputs follow GeoKrigloc. Coefficients mean,
mean1, and so on correspond in order to the columns of X; an
intercept-only model uses only mean. A vector param$mean is a
known observation mean and is mutually exclusive with X. At local
prediction tasks, use either Xloc or Mloc, not both.
For every prediction task the function builds and solves the local kriging system
\Sigma \mathbf{w} = \boldsymbol{\sigma}_0
,
where \Sigma is the Gaussian covariance matrix among the selected
observations and \boldsymbol{\sigma}_0 contains their
covariances with the prediction location. No actual prediction is carried out;
for model-specific local prediction use GeoKrigloc. Local results are returned directly rather
than through temporary-file references, so their components remain available
after the parallel workers have terminated.
An object of class GeoKriglocWeights. Its component weights is a
list ordered by prediction task. With compact=FALSE, each
non-NULL element is the local result returned by
GeoKrigWeights, augmented with neighbor_indices. With
compact=TRUE, each non-NULL element contains only
weights and neighbor_indices. An element is NULL when the requested neighborhood contains no
usable observations. For purely spatial and bivariate models there is one
list element per row of loc; for space-time models the order is location
then requested time. The remaining components record the coordinates,
model, parameters, neighborhood settings, and function call used to construct
the local systems.
Observation-level rows follow time-major order. For fixed sites this is the
order of c(t(data)); for dynamic sites it is the row-binding of
coordx_dyn by list element. Prediction tasks follow location-major
order, so rows of Xloc and elements of Mloc enumerate all
requested times for the first prediction location before moving to the next
location. See GeoModels-spacetime-ordering.
Moreno Bevilacqua, moreno.bevilacqua@uai.cl, Víctor Morales-Oñate, victor.morales@uv.cl, Christian Caamaño-Carrillo, chcaaman@ubiobio.cl
Gaetan, C. and Guyon, X. (2010) Spatial Statistics and Modeling. Springer-Verlag, New York.
GeoKrigloc for local kriging prediction,
GeoKrigWeights for global kriging weights,
GeoCovmatrix for covariance matrix construction.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.