simExpCorrRF {AHMbook}R Documentation

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

variance

variance of field.

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

Author(s)

Marc Kéry & Andy Royle

References

Kéry, M. & Royle, J.A. (2021) Applied Hierarchical Modeling in Ecology AHM2 - 9.

Examples

# Run the function with default values and look at the output
str(tmp <- simExpCorrRF())

[Package AHMbook version 0.2.3 Index]