Learn R Programming

spMC (version 0.2.2)

mcs.sim: Multinomial Categorical Simulation

Description

The function simulates a random field through the Multinomial Categorical Simulation technique (MCS).

Usage

mcs.sim(x, data, coords, grid, knn = NULL)

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 algorithm is based on the Bayesian maximum entropy approach and it honours both the model structure and observed data.

References

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.

See Also

ck.sim, ik.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
myMCSim <- mcs.sim(x, ACM$MAT5, ACM[, 1:3], mygrid)

Run the code above in your browser using DataLab