simExpCorrRF: Create a Gaussian random field with negative exponential correlation
Description
Function creates Gaussian random field with negative exponential correlation and visualizes correlation and random field.
Usage
simExpCorrRF(variance = 1, theta = 1, size = 50, seed = NA, show.plots = TRUE)
Arguments
theta
parameter governing spatial correlation (=1/phi) ("large theta means high correlation") Note that RMexp (which is used internally) is specified in terms of phi = 1/theta.
size
number of pixels along each side of the square site.
seed
used to generate reproducible output.
show.plots
if TRUE, the result will be displayed.
Value
A list with the values of the input arguments and the following additional elements:
field the random field variable, a vector of length size^2
grid the grid corresponding to field
References
K<U+00E9>ry, M. & Royle, J.A. (2021) Applied Hierarchical Modeling in Ecology AHM2 - 9.
Examples
Run this code# NOT RUN {
# Run the function with default values and look at the output
str(tmp <- simExpCorrRF())
# }
Run the code above in your browser using DataLab