View source: R/spatiotemporal.R
| spatiotemporal_gp | R Documentation |
Specify a non-separable Gaussian Process for spatiotemporal effects.
Unlike separable models where the covariance factors as C_s \otimes C_t,
non-separable models allow for direct space-time interaction in the covariance.
No tulpa backend fits a joint space-time covariance, so this constructor
errors. A spatial GP alongside a temporal field is fitted directly by
fit_st_nested() (spatial_type = "hsgp" or "nngp"); tulpa()'s
formula front door does not yet route a continuous spatial field together
with a temporal field (it does for an areal one – icar/bym2/car_proper –
via tulpa(spatial = , temporal = ); gcol33/tulpa#812).
spatiotemporal_gp(
coords,
time_var,
cov_space = c("exponential", "matern", "gaussian", "spherical"),
cov_time = c("exponential", "matern", "gaussian"),
nonsep_type = c("product", "sum", "gneiting", "cressie_huang"),
nn = 15,
shared = NULL
)
coords |
A one-sided formula specifying coordinate columns (e.g.,
|
time_var |
Name of the time variable in data. |
cov_space |
Spatial covariance: |
cov_time |
Temporal covariance: |
nonsep_type |
Non-separability type:
|
nn |
Number of nearest neighbors for NNGP approximation. Default 15. |
shared |
Logical; if TRUE (default), effect enters both processes. |
The non-separable covariance functions allow for more flexible space-time dependence:
Gneiting class:
C(h, u) = \frac{\sigma^2}{(a|u|^{2\alpha} + 1)^{\tau}} \exp\left(-\frac{c\|h\|^{2\gamma}}{(a|u|^{2\alpha} + 1)^{\beta\gamma}}\right)
where h is spatial lag, u is temporal lag, and parameters control the space-time interaction.
Cressie-Huang class: Constructed via Fourier transform methods to ensure positive definiteness.
Nothing: the call always signals an error.
Gneiting, T. (2002). Nonseparable, stationary covariance functions for space-time data. Journal of the American Statistical Association, 97(458), 590-600.
Cressie, N., & Huang, H. C. (1999). Classes of nonseparable, spatio-temporal stationary covariance functions. Journal of the American Statistical Association, 94(448), 1330-1340.
# No backend fits a joint space-time covariance, so the constructor refuses:
try(spatiotemporal_gp(~ lon + lat, "year", nonsep_type = "gneiting"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.