Learn R Programming

spMC (version 0.2.2)

ck.sim: Conditional Simulation Based on Indicator Cokriging

Description

The function simulates a random field through the Indicator Cokriging technique.

Usage

ck.sim(x, data, coords, grid, knn = 12, ordinary = TRUE,
       GA = FALSE, optype = c("param", "fullprobs", "semiprobs", 
       "coordprobs"), max.it = 1000)

Arguments

Value

A data frame containing the simulation grid, the simulated random field, predicted values and the approximated probabilities.

Rdversion

1.1

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 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 is modified to reach a pattern similar to the sample by the use of simulated annealing or genetic algorithm. This procedure may be skipped by setting max.it equal to zero. There are several objective functions for this purpose, by setting optype equal to "param" the optimization is performed through parametric methods. The alternatives "fullprobs" and "semiprobs" are based on transition probabilities computed among simulation points, while the option "coordprobs" is based on transition probabilities calculated among observation and simulation points.

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. http://www.it-weise.de/.

See Also

ik.sim, mcs.sim, path.sim

Examples

Run this code
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 Cokriging algorithm and
# optimize by Simulated Annealing
myANSim <- ck.sim(x, ACM$MAT5, ACM[, 1:3], mygrid, ordinary = FALSE)


# Simulate the random field through
# Ordinary Indicator Cokriging algorithm and
# optimize by Genetic Algorithm
myGASim <- ck.sim(x, ACM$MAT5, ACM[, 1:3], mygrid, GA = TRUE)

Run the code above in your browser using DataLab