nsgpCovMat {GPFDA}R Documentation

Calculate a NSGP covariance matrix given a vector of hyperparameters

Description

Calculate a NSGP covariance matrix given a vector of hyperparameters

Usage

nsgpCovMat(
  hp,
  input,
  inputSubsetIdx = NULL,
  nBasis = 5,
  corrModel = corrModel,
  gamma = NULL,
  nu = NULL,
  cyclic = NULL,
  whichTau = NULL,
  calcCov = T
)

Arguments

hp

Vector of hyperparameters estimated by function nsgpr.

input

List of Q input variables (see Details).

inputSubsetIdx

A list identifying a subset of the input values to be used in the estimation (see Details).

nBasis

Number of B-spline basis functions in each coordinate direction along which parameters change.

corrModel

Correlation function specification used for g(.). It can be either "pow.ex" or "matern".

gamma

Power parameter used in powered exponential kernel function. It must be 0<gamma<=2.

nu

Smoothness parameter of the Matern class. It must be a positive value.

cyclic

Logical vector of dimension Q which defines which covariates are cyclic (periodic). For example, if basis functions should be cyclic only in the first coordinate direction, then cyclic=c(T,F). cyclic must have the same dimension of whichTau. If cyclic is TRUE for some coordinate direction, then cyclic B-spline functions will be used and the varying parameters (and their first two derivatives) will match at the boundaries of that coordinate direction.

whichTau

Logical vector of dimension Q identifying which input coordinates the parameters are function of. For example, if Q=2 and parameters change only with respect to the first coordinate, then we set whichTau=c(T,F).

calcCov

Logical. Calculate covariance matrix or not. If FALSE, time or spatially-varying parameters are still provided.

Value

A list containing

Cov

Covariance matrix

vareps

Noise variance

As_perTau

List of varying anisotropy matrix over the input space

sig2_perTau

Vector of signal variance over the input space

References

Konzen, E., Shi, J. Q. and Wang, Z. (2020) "Modeling Function-Valued Processes with Nonseparable and/or Nonstationary Covariance Structure" <arXiv:1903.09981>.

Examples

## See examples in vignette:
# vignette("nsgpr", package = "GPFDA")

[Package GPFDA version 3.1.3 Index]