| Gauss.st.F | R Documentation |
Simulates a space-time Gaussian random field on a regular (x,y,t) grid.
The field is returned as a 3D array and can be used as a latent field for
log-Gaussian Cox process (LGCP) simulation.
Gauss.st.F(
xlim = c(0, 1),
ylim = c(0, 1),
tlim = c(0, 1),
par1 = c(1, 0.05),
par2 = c(1, 0.06),
sigmas = c(0.5, 0.5, 1),
grid = c(15L, 15L, 10L)
)
xlim, ylim, tlim |
Numeric vectors of length 2 giving the ranges for the spatial and temporal
axes. Defaults are |
par1 |
Numeric vector of length 2 giving the temporal covariance parameters
|
par2 |
Numeric vector of length 2 giving the spatial covariance parameters
|
sigmas |
Numeric vector of length 3 specifying the weights
|
grid |
Integer vector of length 3 giving the number of grid points in the |
The simulated field is a weighted sum of three independent Gaussian components:
Z(x,y,t) = \sigma_1 Z_s(x,y) + \sigma_2 Z_t(t) + \sigma_3 Z_{st}(x,y,t),
where Z_s is a purely spatial field, Z_t is a purely temporal field,
and Z_{st} is a spatio-temporal field with separable exponential covariance
in space and time.
The function uses mvrnorm for multivariate normal simulation
and rdist to compute pairwise distances for covariance
matrix construction.
Spatial and temporal covariances are exponential. The spatio-temporal component uses a separable
covariance C_{st}((u,t),(u',t')) = C_s(u,u') C_t(t,t'). Simulation is performed via Cholesky
factors without constructing the full (nx*ny*nt) \times (nx*ny*nt) covariance matrix.
A list with components:
Numeric array of dimension c(nx, ny, nt) containing simulated field values.
Numeric vector of length nx with x-grid coordinates.
Numeric vector of length ny with y-grid coordinates.
Numeric vector of length nt with time-grid coordinates.
Mohammad Ghorbani mohammad.ghorbani@slu.se
Nafiseh Vafaei nafiseh.vafaei@slu.se
Ghorbani M., Vafaei N., Dvořák J., Myllymäki M. (2021). Testing the first-order separability hypothesis for spatio-temporal point patterns. Computational Statistics and Data Analysis, 161, 107245.
mvrnorm, rdist
if (requireNamespace("MASS", quietly = TRUE) && requireNamespace("fields", quietly = TRUE)) {
set.seed(1)
field <- Gauss.st.F(
xlim = c(0, 1), ylim = c(0, 1), tlim = c(0, 1),
par1 = c(1, 0.05), par2 = c(1, 0.06),
sigmas = c(0.5, 0.5, 1),
grid = c(15, 15, 10)
)
# Inspect dimensions and visualize one time slice
dim(field$Z)
image(field$xcoord, field$ycoord, field$Z[, , 1],
main = "Gaussian Random Field (t = 1)",
col = RColorBrewer::brewer.pal(11, "Spectral"))
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.