posdef.correction | R Documentation |
This function is used to find an optimal positive definite matrix for a given symmetric matrix. First, it proposes a d-length sequence of exponent parameters, which constructs the candidates of smallest positive eigenvalues with the minimal positive eigenvalue of the given matrix. The smallest positive eigenvalues is determined by a penalized minimal Frobenius norm equation. This method is implemented from Huang & Chao's paper (2017).
posdef.correction(Sigma, d)
Sigma |
matrix for calibration |
d |
number of proposed smallest positive eigenvalues |
Reference: Huang, Chao, Daniel Farewell, and Jianxin Pan. "A calibration method for non-positive definite covariance matrix in multivariate data analysis." Journal of Multivariate Analysis 157 (2017): 45-52.
calibrated positive definite matrix
p=10 set.seed(1) mat = matrix(runif(p^2),p,p) mat = mat + t(mat) diag(mat) = 4 print(eigen(mat)$values) mat1 = posdef.correction(mat,d=20) print(eigen(mat1)$values)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.