cor_sep {mcgf}R Documentation

Calculate correlation for separable model

Description

Calculate correlation for separable model

Usage

cor_sep(
  spatial = c("exp", "cauchy"),
  temporal = c("exp", "cauchy"),
  par_s,
  par_t,
  h,
  u
)

Arguments

spatial

Pure spatial model, exp or cauchy for now.

temporal

Pure temporal model, exp or cauchy for now.

par_s

Parameters for the pure spatial model. Nugget effect supported.

par_t

Parameters for the pure temporal model.

h

Euclidean distance matrix or array.

u

Time lag, same dimension as h.

Details

The separable model is the product of a pure temporal model, C_T(u), and a pure spatial model, C_S(\mathbf{h}). It is of the form

C(\mathbf{h}, u)=C_{T}(u) \left[(1-\text{nugget})C_{S}(\mathbf{h})+\text{nugget} \delta_{\mathbf{h}=0}\right],

where \delta_{x=0} is 1 when x=0 and 0 otherwise. Here \mathbf{h}\in\mathbb{R}^2 and u\in\mathbb{R}. Now only exponential and Cauchy correlation models are available.

Value

Correlations of the same dimension as h and u.

References

Gneiting, T. (2002). Nonseparable, Stationary Covariance Functions for Space–Time Data, Journal of the American Statistical Association, 97:458, 590-600.

See Also

Other correlation functions: cor_cauchy(), cor_exp(), cor_fs(), cor_lagr_askey(), cor_lagr_exp(), cor_lagr_tri(), cor_stat(), cor_stat_rs()

Examples

h <- matrix(c(0, 5, 5, 0), nrow = 2)
par_s <- list(nugget = 0.5, c = 0.01, gamma = 0.5)
u <- matrix(0, nrow = 2, ncol = 2)
par_t <- list(a = 1, alpha = 0.5)
cor_sep(
    spatial = "exp", temporal = "cauchy", par_s = par_s, par_t = par_t,
    h = h, u = u
)

h <- array(c(0, 5, 5, 0), dim = c(2, 2, 3))
par_s <- list(nugget = 0.5, c = 0.01, gamma = 0.5)
u <- array(rep(0:2, each = 4), dim = c(2, 2, 3))
par_t <- list(a = 1, alpha = 0.5)
cor_sep(
    spatial = "exp", temporal = "cauchy", par_s = par_s, par_t = par_t,
    h = h, u = u
)


[Package mcgf version 1.1.1 Index]