8 Simulation of Gaussian Random Fields

The function grf generates simulations of Gaussian random fields on regular or irregular sets of locations. It relies on the decomposition of the covariance matrix and therfore won’t work for large number of locations in which case we suggest the usage of the package RandomFields. Some of its functionality is illustrated by the next commands.



  > par(mfrow = c(1, 2))
  > sim1 <- grf(100, cov.pars = c(1, 0.25))
  > points.geodata(sim1, main = "simulated locations and values")
  > plot(sim1, max.dist = 1, main = "true and empirical variograms")

pict

Figure 17: Simulation results produced with the function grf.



  > par(mfrow = c(1, 2))
  > sim2 <- grf(441, grid = "reg", cov.pars = c(1,
  +     0.25))
  > image(sim2, main = "a small-ish simulation", col = gray(seq(1,
  +     0.1, l = 30)))

pict

Figure 18: Simulations with different resolutions

NOTE: we recommend the package RandomFields (http://cran.r-project.org/src/contrib/PACKAGES.html#RandomFields) for a more comprehensive implementation for simulation of Gaussian Random Fields.