This function computes the discretization of an exponential covariance function of the form: $$C( s, t ) = \alpha e^{ - \beta | s - t | }$$ over a 1D grid \([t_0, t_1, \ldots, t_{P-1}]\), thus obtaining the \(P \times P\) matrix of values: $$ C_{i,j} = C( t_i, t_j ) = \alpha e^{ - \beta | t_i - t_j | } .$$

exp_cov_function(grid, alpha, beta)

Arguments

grid

a vector of time points.

alpha

the alpha parameter in the exponential covariance formula.

beta

the beta parameter in the exponential covariance formula.

Examples


grid = seq( 0, 1, length.out = 5e2 )

alpha = 0.2
beta = 0.3

dev.new()
image( exp_cov_function( grid, alpha, beta ),
       main = 'Exponential covariance function',
       xlab = 'grid', ylab = 'grid')