getCovMatSR: Create a covariance matrix.

Description Usage Arguments Value See Also Examples

View source: R/getCoxMatsR.R

Description

getCovMatSR returns a stationary covariance matrix (with nugget). This creates a covariance matrix, C, where

C = sigma^2 R + \sig2Eps I

R is a correlation matrix, sigma2 the process variance, and sig2eps is the variance of the noise (or nugget).

Usage

1
getCovMatSR(sigma2, R, sigma2eps)

Arguments

sigma2

A positive scalar representing the process variance

R

An n x n correlation matrix.

sig2eps

A positive scalar representing the variance of the noise (or nugget).

Value

An n x n covariance matrix

See Also

Other correlation and covariance functions: combineCorMatsR, getCorMatR, getCovMatNSR

Examples

1
2
3
4
5
6
7
n <- 10
d <- 2
x <- matrix(runif(n * d), nrow = n, ncol = d)
rho <- runif(d, 0, 1)
R <- getCorMat(x, rho)
sigma2 <- 1.2
getCovMatSR(V, R, sig2)

cbdavis33/bcgp documentation built on Oct. 1, 2019, 8:07 a.m.