Re: [R] Change the argument function inside R function in GPfit package

2015-03-09 Thread C W
I guess I should re-frame my question with real data. > xx [,1] [1,] 0.0 [2,] 0.2 [3,] 0.4 [4,] 0.6 [5,] 0.8 > yy [,1] [1,] 0.000 [2,] 0.1652000 [3,] 0.4343223 [4,] 0.5996505 [5,] 0.7195857 > cor.mat [,1] [,2] [,3] [,4][,5] [1,] 1.00

[R] Change the argument function inside R function in GPfit package

2015-03-09 Thread C W
Hi R list, I am using the GPfit package to fit Gaussian Process model. The kernel in the package is, K(x, x') = sigma^2 * exp(x-x')^2 My kernel have an extra term, K((x, z), (x', z')) = sigma^2 * exp(x-x')^2 * exp(z-z')^2 The function corr_matrix() is, corr_matrix(X, beta, corr=list(type="expon