check_pd: Check if an Autocovariance Function Estimate is...

View source: R/metrics.R

check_pdR Documentation

Check if an Autocovariance Function Estimate is Positive-Definite or Not.

Description

This function checks if an autocovariance function estimate is positive-definite or not by determining if the eigenvalues of the corresponding matrix (see the Details section) are all positive.

Usage

check_pd(est)

Arguments

est

A numeric vector or corresponding cyclic matrix representing an estimated autocovariance function.

Details

For an autocovariance function estimate \hat{C}(\cdot) over a set of lags separated by a constant difference \{h_{0}, h_{1} , h_{2} , \dots , h_{n} \}, construct the symmetric matrix

\left[ {\begin{array}{ccccc} \hat{C}(h_{0}) & \hat{C}(h_{1}) & \cdots & \hat{C}(h_{n - 1}) & \hat{C}(h_{n}) \\ \hat{C}(h_{1}) & \hat{C}(h_{0}) & \cdots & \hat{C}(h_{n - 2}) & \hat{C}(h_{n - 1}) \\ \vdots & \vdots & \ddots & \vdots & \vdots \\ \hat{C}(h_{n - 1}) & \hat{C}(h_{n - 2}) & \cdots & \hat{C}(h_{0}) & \hat{C}(h_{1}) \\ \hat{C}(h_{n}) & \hat{C}(h_{n - 1}) & \cdots & \hat{C}(h_{1}) & \hat{C}(h_{0}) \\ \end{array}} \right] .

The eigendecomposition of this matrix is computed to determine if all eigenvalues are positive. If so, the estimated autocovariance function is assumed to be positive-definite.

Value

A boolean where TRUE denotes a positive-definite autocovariance function estimate and FALSE for an estimate that is not positive-definite.

Examples

x <- seq(0, 5, by=0.1)
estCov <- exp(-x^2)
check_pd(estCov)
check_pd(cyclic_matrix(estCov))

CovEsts documentation built on Sept. 10, 2025, 10:39 a.m.

Related to check_pd in CovEsts...