Learn R Programming

MuFiMeshGP (version 0.0.1)

cov_gen: Generates the covariance matrix

Description

Generates the covariance matrix for the Gaussian kernel or Matern kernel

Usage

cov_gen(
  x1,
  x2 = NULL,
  t1,
  t2 = NULL,
  phi1sq,
  phi2sq,
  sigma1sq,
  sigma2sq,
  H,
  l = 4,
  covtype,
  iso,
  nugget = sqrt(.Machine$double.eps)
)

Value

a matrix of size (nrow(x1), nrow(x2)), or (nrow(x1), nrow(x1)) if x2 and t2 are NULL.

Arguments

x1, x2

Design input location matrices. x2 is to be used only to create cross-covariance matrix.

t1, t2

Design tunable parameter vectors. t2 is to be used only to create cross-covariance matrix.

phi1sq, phi2sq, sigma1sq, sigma2sq, H, l

hyper-parameters for the covariance function

covtype

kernel function used: "Gaussian" is the only available one at the moment.

iso

If TRUE, then the covariance function is isotropic. If FALSE, the covariance function is anisotropic.

nugget

optional