Skip to contents

Matern covariance with smoothness 3/2, in the same parameterization as the Stan models: C(d) = sigma^2 (1 + sqrt(3) d / ell) exp(-sqrt(3) d / ell). The argument name rho (the length-scale ell) is kept for backward compatibility.

Usage

matern32(d, sigma = 1, rho)

Arguments

d

Distances.

sigma

Marginal standard deviation.

rho

Length-scale ell; not the density-expression correlation.

Value

Numeric vector of covariances, one per element of d.

Examples

matern32(c(0, 0.5, 1, 2), rho = 1)
#> [1] 1.0000000 0.7848877 0.4833577 0.1397314