Learn R Programming

CaliCo (version 0.1.1)

kernel.fun: Generates covariances matrices thanks to Kernel.class

Description

Kernel.fun is a function that allows us to generate covariances matrices from data

Usage

kernel.fun(X, var, psi, kernel.type = "gauss")

Arguments

X

data

var

the variance for the covariance function

psi

the parameter vector

kernel.type

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}$$

Value

Kernel.fun returns a covariance matrix

See Also

model.class, prior.class

Examples

Run this code
# 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