lk | R Documentation |
Function implements ANN based neighbor search, automatic variogram estimation and ordinary Kriging at query locations.
lk(query, obs, th, xcoord = "x", ycoord = "y", zcoord = "z", vlen = 15, cl=NULL)
query |
a data frame containing query spatial locations |
obs |
a data frame containing spatial locations and observed data |
th |
a vector, distance threshold for neighbor search |
xcoord |
a character constant, field name for x coordinate in both |
ycoord |
a character constant, field name for y coordinate in both |
zcoord |
a character constant, field name for data in |
vlen |
number of bins to compute local spatial variogram |
cl |
a cluster object for multi-core computing (default number of cores in the PC minue one), 0 means single core |
This function implements a local spatial Kriging method for spatial prediction using large data sets. At each location where prediction is required (termed as query point), a conservative distance threshold is used to select neighboring locations from the observed (or sample) data, which has XY coordinates.
A local variogram is used to estimate ordinary Kriging within this neighborhood.
Implementation of the local Kriging requires specifying a distance threshold (th). It is an upper bound within which spatial auto-correlation is believed to exist. The distance threshold may be obtained from variogram estimates or chosen based on prior knowledge of the underlying spatial process. For the given threshold, ANN tree is used to efficiently identify neighbors.
This function does not perform local kriging when the neighborhood contains less than five distinct spatial locations with observed data in the neighborhood. More data points are recommended for robust varioram estimation.
Four variogram models: Gaussian, exponential, spherical and Matern are automatically fit to the empirical variogram. The range parameter is estimated from the first distance lag where the empirical variogram exceeds 80
The estimated range parameter is used to reduce the neighborhood. Only initial neighbors that are spatially correlated with the process at the query point are used in prediction. In case the estimated range is small, indicating a locally weak spatial process, a sample of 10
Field names for geographic coordinates must match between query and observed data frames.
kriging prediction and standard deviation and quality flags.
krig | predictive mean |
sigma | predictive standard error |
Hs | estimated range |
nugget | estimated nugget |
psill | estimated partial sill |
model | variogram model |
where the variogram model are
1 | Spherical |
2 | Gaussian |
3 | Exponential |
4 | Matern |
Jun chen (wdidwlia@gmail.com) Jin Chen (jc.chenjin@gmail.com) Naresh Kumar (NKumar@med.miami.edu) Dong Liang (dliang@umces.edu)
autoKrige
in automap
data(epa_cl)
data(ex)
out <- lk(ex1.grid[1:10,],ex1.data,0.5,cl=0)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.