adj_grad: Convert Non-Positive-Definite Correlation Matrix to Positive-Definite Matrix Using the Adjusted Gradient Updating Method
Description
This function converts a non-positive-definite correlation matrix to a positive-definite matrix using the
adjusted gradient updating method with initial matrix B1.
Usage
adj_grad(Sigma = NULL, B1 = NULL, tau = 0.5, tol = 0.1, steps = 100,
msteps = 10)
Arguments
Sigma
the non-PD correlation matrix
B1
the initial matrix for algorithm; if NULL, uses a scaled initial matrix with diagonal elements sqrt(nrow(Sigma))/2
tau
parameter used to calculate theta
tol
maximum error for Frobenius norm distance between new matrix and original matrix
steps
maximum number of steps for k (default = 100)
msteps
maximum number of steps for m (default = 10)
Value
list with Sigma2 the new correlation matrix, dist the Frobenius norm distance between Sigma2 and Sigma,
eig0 original eigenvalues of Sigma, eig2 eigenvalues of Sigma2
JF Yin and Y Zhang (2013). Alternative gradient algorithms for computing the nearest correlation matrix.
Applied Mathematics and Computation, 219(14): 7591-7599. https://doi.org/10.1016/j.amc.2013.01.045.
Y Zhang and JF Yin. Modified alternative gradients algorithm for computing the nearest correlation matrix.
Internal paper of the Tongji University, Shanghai.