sim_path | R Documentation |
The function simulates a random field through the Fixed Path algorithm or Random Path technique.
sim_path(x, data, coords, grid, radius, fixed = FALSE, entropy = FALSE)
x |
an object of the class |
data |
a categorical data vector of length |
coords |
an |
grid |
an |
radius |
a numerical value that specifies a proper radius to search the nearest observed points within a |
fixed |
a logical value; if |
entropy |
a logical value. If |
These methods compute 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).
\mbox{\hspace{0cm}}
Path algorithms are based on Pickard random fields, so that the states of such chain at any unsampled location depends on the state of its nearest known neighbours in axial directions.
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
.
Luca Sartore drwolf85@gmail.com
Li, W. (2007) A Fixed-Path Markov Chain Algorithm for Conditional Simulation of Discrete Spatial Variables. Mathematical Geology, 39(2), 159-176.
Li, W. (2007) Markov Chain Random Fields for Estimation of Categorical Variables. Mathematical Geology, 39(June), 321-335.
Pickard, D. K. (1980) Unilateral Markov Fields. Advances in Applied Probability, 12(3), 655-671.
Sartore, L. (2010) Geostatistical models for 3-D data. M.Phil. thesis, Ca' Foscari University of Venice.
sim_ck
, sim_ik
, sim_mcs
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
# the fixed path algorithm
myFixPathSim <- sim_path(x, ACM$MAT5, ACM[, 1:3], mygrid,
radius = 50, fixed = TRUE)
# Simulate the random field through
# the random path algorithm
myRndPathSim <- sim_path(x, ACM$MAT5, ACM[, 1:3], mygrid, radius = 50)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.