Description Usage Arguments Value References Examples

This function converts a non-positive-definite correlation matrix to a positive-definite matrix using the
adjusted gradient updating method with initial matrix `B1`

.

1 2 |

`Sigma` |
the non-PD correlation matrix |

`B1` |
the initial matrix for algorithm; if NULL, uses a scaled initial matrix with diagonal elements |

`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) |

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`

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.

1 2 |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.