Generate a realisation of a Gaussian Random Field with given first and second moments.
rGRFgauss(W = owin(), mu = 0, var = 1, scale,
..., nsim = 1, drop = TRUE)
rGRFexpo(W = owin(), mu = 0, var = 1, scale,
..., nsim = 1, drop = TRUE)
rGRFstable(W = owin(), mu = 0, var = 1, scale, alpha,
..., nsim = 1, drop = TRUE)
rGRFgencauchy(W = owin(), mu = 0, var = 1, scale, alpha, beta,
..., nsim = 1, drop = TRUE)
rGRFmatern(W = owin(), mu = 0, var = 1, scale, nu,
..., nsim = 1, drop = TRUE)If nsim=1 and drop=TRUE, a pixel image
(object of class "im").
Otherwise, a list of pixel images.
Window (object of class "owin") in which to generate the
simulated random field.
The mean of the random field. A single numeric value,
or a function(x, y, ...),
or a pixel image (object of class "im").
Variance of the random field. A single positive number.
Spatial scale parameter \(h\). A single positive number. See Details.
Additional parameters for specific models. See Details.
Arguments passed to as.mask to determine
the pixel resolution.
Number of simulated realisations to be generated.
Logical. If nsim=1 and drop=TRUE (the default), the
result will be a point pattern, rather than a list
containing a point pattern.
Tilman Davies Tilman.Davies@otago.ac.nz and David Bryant. Modified by Adrian Baddeley Adrian.Baddeley@curtin.edu.au.
These functions generate simulated realisations of a Gaussian random field.
The mean \(E[Z(u)]\) of the Gaussian random field value \(Z(u)\)
at any location \(u\) is specified by the argument mu,
which may be a constant, a function(x,y,...), or a pixel image.
The variance \(V[Z(u)]\) of the Gaussian random field value
is specified by the argument var, which should be a single
positive numerical value.
The correlation \(C(u - v) = C(Z(u), Z(v))\) between the values at two locations \(u\) and \(v\) depends on the distance \(r = \| u-v\|\) as follows:
rGRFexpothe exponential covariance function
$$C(r) = \sigma^2 \exp(-r/h)$$
where \(\sigma^2\) is the variance parameter var,
and \(h\) is the scale parameter scale.
rGRFgaussthe Gaussian covariance function
$$C(r) = \sigma^2 \exp(-(r/h)^2)$$
where \(\sigma^2\) is the variance parameter var,
and \(h\) is the scale parameter scale.
rGRFstablethe stable covariance function
$$
C(r) = \sigma^2 \exp(-(r/h)^\alpha)
$$
where \(\sigma^2\) is the variance parameter var,
\(h\) is the scale parameter scale,
and \(\alpha\) is the shape parameter alpha.
rGRFgencauchythe generalised Cauchy covariance function
$$
C(r) = \sigma^2 (1 + (x/h)^\alpha)^{-\beta/\alpha}
$$
where \(\sigma^2\) is the variance parameter var,
\(h\) is the scale parameter scale,
and \(\alpha\) and \(\beta\) are the shape parameters
alpha and beta.
rGRFmaternthe Whittle-Matern covariance function
$$
C(r) = \sigma^2 \frac{1}{2^{\nu-1} \Gamma(\nu)}
(\sqrt{2 \nu} \, r/h)^\nu K_\nu(\sqrt{2\nu}\, r/h)
$$
where \(\sigma^2\) is the variance parameter var,
\(h\) is the scale parameter scale,
and \(\nu\) is the shape parameter nu.
The algorithm generates nsim simulated realisations
of the random field using the circulant embedding technique
(Davies and Bryant, 2013).
Davies, T.M. and Bryant, D. (2013) On Circulant Embedding for Gaussian Random Fields in R. Journal of Statistical Software 55, issue 9 tools:::Rd_expr_doi("10.18637/jss.v055.i09")
rLGCP