powered by
Kernel.class
Kernel.fun is a function that allows us to generate covariances matrices from data
Kernel.fun
kernel.fun(X, var, psi, kernel.type = "gauss")
data
the variance for the covariance function
the parameter vector
the choice of the form of the kernel (with d chosen as an euclidian distance)
gauss $$\sigma^2 exp{-1/2(d/\psi)^2}$$
exp $$\sigma^2 exp{-1/2 d/\psi}$$
matern3_2 $$\sigma^2(1+\sqrt{3}d^2/\psi) exp{-\sqrt{3}d^2/\psi}$$
matern5_2 $$\sigma^2(1+\sqrt{5}d^2/\psi+5d^2/(3\psi^2))exp{-\sqrt{5}d^2/\psi}$$
Kernel.fun returns a covariance matrix
model.class, prior.class
model.class
prior.class
# NOT RUN { X <- cbind(seq(0,10,length.out=10),seq(8,20,length.out=10)) var <- 2 psi <- 0.1 Cov <- kernel.fun(X,var,psi,kernel.type="matern5_2") # }
Run the code above in your browser using DataLab