The expression of the space-time Gneiting’s covariance on \(\mathbb{R}^d \times \mathbb{R}\) is:
\[ C(h, u; \alpha, \beta, \nu) = (1 + \|u\|^{\alpha})^{-\frac{\beta}{2}d} \mathcal{K}_{\nu} (\frac{\|h\|}{(1 + \|u\|^{\alpha})^{\frac{\beta}{2}}}) \]
where \((h,u)\) are the increments, respectively in the space \(\mathbb{R}^d\) and time \(\mathbb{R}\), \(\mathcal{K}\) is the Gauss, Matern, or Cauchy kernel, defining the spatial trace,
and, the parameters \(\alpha \in (0,2]\) and \(\beta \in (0,1]\) defines the temporal trance.
In addition a geometrical anisotropy can be defined in scaling coefficients \((\boldsymbol{a}, a_t) > 0\) and and a rotation matrix \(R\): \(\|h\| = \sqrt{(h^t \left(R^t D_{(1/\boldsymbol{a}^2)}R\right)h)}\) and \(\|u\|= |u|/a_t\).
## NULL
## Space Type = COMPOSITE
## Space Dimension = 2
## Space Type [0] = RN
## Space Dimension [0] = 1
## Space Type [1] = RN
## Space Dimension [1] = 1
## NULL
tit_main = paste0(type_label[1+type], "(", d, "d)")
if (type == 0) {
tit_sub = bquote(paste(alpha == .(alpha), "; ", beta == .(beta)))
} else {
tit_sub = bquote(paste(alpha == .(alpha), "; ", beta == .(beta), "; ", nu == .(nu)))
}
d = mg_in_gstlearn$getNDim() - 1
stopifnot(d <= 3)
ns = 5000 # number of spectral components
prefix = paste("GM", d, "d", sep = "_")
# grid
nx = c(rep(100, 3), 50)[c(1:d, 4)]
dx = c(rep(0.15, 3), 0.3)[c(1:d, 4)]
x0 = c(rep(0, 3), 0)[c(1:d, 4)]
grd = DbGrid_create(nx = nx, dx = dx, x0 = x0)
# variogram parameters
nlag = 20
incr = diag(d+1)
if (d == 1) {
incr = cbind(incr, c(1,1))
} else if (d == 2) {
incr = cbind(incr, c(1,1,0))
incr = cbind(incr, c(1,0,1))
incr = cbind(incr, c(0,1,1))
}
ndir = ncol(incr)
col_dir = palette.colors(ndir)
lab_dir = NULL
varioPar = VarioParam()
for (idir in (1:ndir)) {
dir_param = DirParam_createFromGrid(grd, nlag = nlag, grincr = incr[,idir])
err = varioPar$addDir(dir_param)
key = "["
for (k in 1:(d+1)) {
key = paste0(key, incr[k,idir])
if (k <= d) {key = paste0(key, ",")}
}
key = paste0(key, "]")
lab_dir = c(lab_dir, key)
}
Performing a single simulation using the SimuSpectralRN interface:
# simulation
gssimu = SimuSpectralRN(cova = mg_in_gstlearn)
err = gssimu$simulate(ns = ns)
# computation
err = grd$deleteColumns(names = paste0(prefix, "*"))
err = gssimu$compute(dbout = grd, verbose = TRUE,
namconv = NamingConvention(prefix), qualifier = "simu")
## Spectral Simulation on a set of Isolated Points
## - Number of samples = 5000
## - Space dimension = 2
## - Number of variables = 1
## Spectral Simulation on a set of Isolated Points
## - Number of samples = 5000
## - Space dimension = 2
## - Number of spectral components = 5000
## - Number of variables = 1
| Number | Minimum | Maximum | Mean | St. Dev. | |
|---|---|---|---|---|---|
| GM_1_d.V1.simu | 5000 | -2.153627 | 3.124459 | 0.5376792 | 0.939276 |
Performing multiple simulations using the simuSpectral interface:
# simulations
nsim = 20
err = grd$deleteColumns(names = paste0(prefix, "*"))
err = simuSpectral(dbin = NULL, dbout = grd, cova = mg_in_gstlearn, seed = 0,
nbsimu = nsim, ns = ns, namconv = NamingConvention(prefix), verbose = FALSE)
Gneiting, T. (2013). Strictly and non-strictly positive definite functions on spheres.
Allard, D., Emery, X., Lacaux, C., & Lantuéjoul, C. (2020). Simulating space-time random fields with nonseparable Gneiting-type covariance functions. Statistics and Computing, 30(5), 1479-1495.
Allard, D., Benoit, L., & Obakrim, S. (2025). Modeling and simulating spatio-temporal, multivariate and nonstationary Gaussian Random Fields: a Gaussian mixtures perspective.