sim_ik {spMC} | R Documentation |
Conditional Simulation Based on Indicator Kriging
Description
The function simulates a random field through the Indicator Kriging technique.
Usage
sim_ik(x, data, coords, grid, knn = 12, ordinary = TRUE, entropy = FALSE)
Arguments
x |
an object of the class |
data |
a categorical data vector of length |
coords |
an |
grid |
an |
knn |
an integer value which specifies the number of k-nearest neighbours for each simulation point. An optimal number is between 4 and 12. If |
ordinary |
a logical value; if |
entropy |
a logical value. If |
Details
This method computes an approximation of posterior probabilities
\Pr\left(Z(\mathbf{s}_0) = z_k \left\vert \bigcap_{i = 1}^n Z(\mathbf{s}_i) = z(\mathbf{s}_i)\right.\right).
\hspace{0cm}
The probability is calculated as the sum of the observed proportion and the weighted sum of indicator variables which denote the presence of the k
-th category in observed points \mathbf{s}_i
. Weights involved in the sum are the solution of a system of equations.
Probabilities approximated are usually truncated and normalized with respect to the probability constraints, because such probabilities might lie outside the interval [0, 1]
. The normalization procedure is designed such that it is not possible to obtain vectors such that the sum of their probabilities is always equal to one.
When an initial configuration is simulated, it should be modified to reach a pattern similar to the sample by the use of the quench
function.
Value
A data frame containing the simulation grid, the simulated random field, predicted values and the approximated probabilities is returned. Two extra columns respectively denoting the entropy and standardized entorpy are bindend to the data frame when argument entropy = TRUE
.
Author(s)
Luca Sartore drwolf85@gmail.com
References
Carle, S. F., Fogg, G. E. (1996) Transition Probability-Based Indicator Geostatistics. Mathematical Geosciences, 28(4), 453-476.
Carle, S. F. (1999) T-PROGS: Transition Probability Geostatistical Software. University of California, Davis.
Sartore, L. (2010) Geostatistical models for 3-D data. M.Phil. thesis, Ca' Foscari University of Venice.
Weise, T. (2009) Global Optimization Algorithms - Theory and Application. https://archive.org/details/Thomas_Weise__Global_Optimization_Algorithms_Theory_and_Application.
See Also
Examples
data(ACM)
# Model parameters estimation for the
# multinomial categorical simulation
x <- multi_tpfit(ACM$MAT5, ACM[, 1:3])
# Generate the simulation grid
mygrid <- list()
mygrid$X <- seq(min(ACM$X), max(ACM$X), length = 20)
mygrid$Y <- seq(min(ACM$Y), max(ACM$Y), length = 20)
mygrid$Z <- -40 * 0:9 - 1
mygrid <- as.matrix(expand.grid(mygrid$X, mygrid$Y, mygrid$Z))
# Simulate the random field through
# Simple Indicator Kriging algorithm
mySIKSim <- sim_ik(x, ACM$MAT5, ACM[, 1:3], mygrid, ordinary = FALSE)
# Simulate the random field through
# Ordinary Indicator Kriging algorithm
myOIKSim <- sim_ik(x, ACM$MAT5, ACM[, 1:3], mygrid)