Description Usage Arguments Value Examples
Runs gasp code to do gaussian process inference using covariates x and y and a constant regression model and a Gaussian correlation function. Returns the fitted theta parameters
1 | fitGauss(x, y)
|
x |
covariates |
y |
response |
fitted theta parameters
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | n <- 10
x1 <- seq(-5,10,length.out = n)
x2 <- seq(0,15,length.out = n)
x <- expand.grid(x1,x2)
x <- as.matrix(x)
d2 <- c(0.01,0.2,0,0) #here we set the theta parameters to be 0.01 and 0.2.
cor.par <- data.frame(matrix(data = d2,nrow = dim(x)[2],ncol = 2))
names(cor.par) <- c("Theta.y","Alpha.y")
R <- cor.matrix(x,cor.par) # obtain covariance matrix
L <- chol(R)
z <- as.matrix(rnorm(n^2))
y <- L%*%z
fitGauss(x,y)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.