cor.matrix: Correlation Matrix for Gaussian Process based on...

Description Usage Arguments Value Examples

Description

Correlation Matrix for Gaussian Process based on Power-Exponential Correlation function (c) Copyright William J. Welch 2000-2006.

Usage

1
cor.matrix(x, cor.par)

Arguments

x

matrix/vector of explanatory variables

cor.par

matrix of correlation parameters

Value

returns the correlation matrix based on power-exponential correlation structure

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
n <- 5
x1 <- seq(-5,10,length.out = n)
x2 <- seq(0,15,length.out = n)

data1 <- expand.grid(x1,x2)
x <- data1
# create hyperparameter matrix of thetas and alphas, alphas set to 0 indicated guassian correlation
d2 <- c(0.01,0.2,0,0)
cor.par <- data.frame(matrix(data = d2,nrow = dim(x)[2],ncol = 2))
names(cor.par) <- c("Theta.y","Alpha.y")


R <- cor.matrix(data1,cor.par) # obtain covariance matrix

galotalp/gpMCMC documentation built on May 16, 2019, 5:36 p.m.