sim_mcs | R Documentation |
The function simulates a random field through the Multinomial Categorical Simulation technique (MCS).
sim_mcs(x, data, coords, grid, knn = NULL, entropy = FALSE)
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. If |
entropy |
a logical value. If |
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 algorithm is based on the Bayesian maximum entropy approach and it honours both the model structure and observed data.
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
Allard, D., D'Or, D., Froidevaux, R. (2011) An efficient maximum entropy approach for categorical variable prediction. European Journal of Soil Science, 62(3), 381-393.
Sartore, L. (2010) Geostatistical models for 3-D data. M.Phil. thesis, Ca' Foscari University of Venice.
sim_ck
, sim_ik
, sim_path
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 = 3)
mygrid$Y <- seq(min(ACM$Y), max(ACM$Y), length = 3)
mygrid$Z <- -40 * 0:9 - 1
mygrid <- as.matrix(expand.grid(mygrid$X, mygrid$Y, mygrid$Z))
# Simulate the random field
myMCSim <- sim_mcs(x, ACM$MAT5, ACM[, 1:3], mygrid)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.