adj_grad: Convert Non-Positive-Definite Correlation Matrix to...

Description Usage Arguments Value References Examples

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

1
2
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

References

S Maree (2012). Correcting Non Positive Definite Correlation Matrices. BSc Thesis Applied Mathematics, TU Delft. http://resolver.tudelft.nl/uuid:2175c274-ab03-4fd5-85a9-228fe421cdbf.

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.

Examples

1
2
Sigma <- matrix(c(1, 0, 0.8, 0, 1, 0.8, 0.8, 0.8, 1), 3, 3, byrow = TRUE)
adj_grad(Sigma)

SimRepeat documentation built on May 2, 2019, 9:32 a.m.