code
a function which takes in entry X and theta
X
the matrix of the forced variables
var
the variance for the covariance function
psi
the scale vector of correlation length
n
number of experiments
Kernel.type
the chosen form of covariance
Cov
the covariance