Skip to contents

\(Z_1\) and an independent \(Z_2\) come from SpectralGRF (seeds seed and seed + 1); \(Y = \gamma Z_1 + \sqrt{1 - \gamma^2} Z_2\) has the covariance of \(Z_1\) and cross-covariance \(\gamma C(h)\) (intrinsic coregionalisation; Wackernagel 2003).

Usage

CoherentFields(
  coords,
  cov_model = "exponential",
  cov_params = list(),
  coherence = 0.5,
  n_sims = 1L,
  seed = 1L
)

Arguments

coords

Two-column matrix of regular grid points.

cov_model

"exponential", "gaussian", "matern" or "spherical".

cov_params

List with sill, range, nugget, nu, angle, ratio.

coherence

Coherence \(\gamma\) between -1 and 1.

n_sims

Number of realisations.

seed

Philox seed.

Value

List with first, second, coherence.

References

Wackernagel, H. (2003). Multivariate Geostatistics, 3rd edn. Springer, Berlin.

Examples

g <- as.matrix(expand.grid(0:2, 0:2))
r <- CoherentFields(g, coherence = 1, seed = 2)
all.equal(r$first, r$second)
#> [1] TRUE