expcov: Exponential covariance function for Gaussian processes

expcovR Documentation

Exponential covariance function for Gaussian processes

Description

Computes the exponential covariance matrix.

Usage

expcov(edists, rho, sigma2)

Arguments

edists

Numeric matrix (M \times M) of pairwise Euclidean distances between spatial locations.

rho

Positive numeric scalar. Length-scale parameter \rho controlling the decay of correlation with distance.

sigma2

Positive numeric scalar. Signal variance parameter \sigma^2 controlling the overall variance.

Details

The covariance function is defined as:

C_{i,j} = \sigma^2 \exp(-d_{i,j} / \rho)

where d_{ij} is the distance between locations i and j.

Larger values of \rho imply slower decay of correlation with distance (i.e., stronger spatial autocorrelation). Larger values of \sigma^2 increase the marginal variance of the process.

A small nugget term (1e-6) is added to the diagonal for numerical stability.

Value

A numeric matrix (M \times M) representing the covariance between spatial locations.

Author(s)

Fabian Ketwaroo

Examples

coords <- matrix(runif(10), ncol = 2)
d <- as.matrix(dist(coords))
expcov(edists = d, rho = 0.5, sigma2 = 1)


BayesNSGP documentation built on Sept. 10, 2026, 5:08 p.m.

Related to expcov in BayesNSGP...