This function computes values of the Matern kernel for given distances and parameters.
matern.kernel(u, rho, kappa)a vector, matrix or array with values of the distances between pairs of data locations.
value of the (re-parametrized) scale parameter; this corresponds to the re-parametrization rho = 2*sqrt(kappa)*phi.
value of the shape parameter.
A vector matrix or array, according to the argument u, with the values of the Matern kernel function for the given distances.
The Matern kernel is defined as: $$ K(u; \phi, \kappa) = \frac{\Gamma(\kappa + 1)^{1/2}\kappa^{(\kappa+1)/4}u^{(\kappa-1)/2}}{\pi^{1/2}\Gamma((\kappa+1)/2)\Gamma(\kappa)^{1/2}(2\kappa^{1/2}\phi)^{(\kappa+1)/2}}\mathcal{K}_{\kappa}(u/\phi), u > 0, $$ where \(\phi\) and \(\kappa\) are the scale and shape parameters, respectively, and \(\mathcal{K}_{\kappa}(.)\) is the modified Bessel function of the third kind of order \(\kappa\). The family is valid for \(\phi > 0\) and \(\kappa > 0\).