psi_helpers: Ornstein-Uhlenbeck Correlation Matrix and Derivatives

psi_helpersR Documentation

Ornstein-Uhlenbeck Correlation Matrix and Derivatives

Description

computePsiMatrix builds the n \times n correlation matrix using the range-normalized OU kernel \Psi_{jl} = \exp(-w|t_j-t_l|/R), where R = \max(X_t) - \min(X_t). This normalisation makes w scale-invariant; note the estimated \hat{w} is on the normalized scale and converts to the paper's scale via w_{\text{paper}} = \hat{w} / R.

computeCovMatrix returns \sigma^2 \Psi.

devPsi returns the first and second derivatives of \Psi with respect to w, used by dev_elbo during the M-step.

Arguments

Xt, Xp

Numeric vectors of time points (rows and columns of \Psi). In practice Xp = Xt.

w

Positive scalar. Correlation decay parameter.

sigma

Positive scalar. Standard deviation for covariance scaling (computeCovMatrix only).

Value

computePsiMatrix: an n \times n matrix with values in (0,1]. computeCovMatrix: an n \times n covariance matrix. devPsi: a list with matrices dPsi and d2Psi.


fda.vi documentation built on June 20, 2026, 5:06 p.m.