check_pd | R Documentation |
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.
check_pd(est)
est |
A numeric vector or corresponding cyclic matrix representing an estimated autocovariance function. |
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.
A boolean where TRUE
denotes a positive-definite autocovariance function estimate and FALSE
for an estimate that is not positive-definite.
x <- seq(0, 5, by=0.1)
estCov <- exp(-x^2)
check_pd(estCov)
check_pd(cyclic_matrix(estCov))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.