This module contains the following utilities functions, to help manipulating matrix and modeling.
CHOLESKY | Returns the lower cholesky factor of a symmetric, positive definite matrix |
CORR.2.COV | Converts a correlation matrix to a covariance matrix |
CORR.MAT | Returns the correlation matrix. |
COV.2.CORR | Converts a covariance matrix to a correlation matrix |
DIAG | Returns a square diagonal matrix with the elements of the argument on the main diagonal. |
EIGEN.VALUES | Returns the eigenvalues of a symmetric matrix |
EIGEN.VECTORS | Returns the eigenvectors of a symmetric matrix |
EXTRACT.DIAG | Returns the main diagonal of a square matrix |
IS.PSD | Check if the matrix is positive semi-definite |
NEAREST.CORR | Find the nearest correlation matrix that is positive semi-definite. |
NEAREST.COV | Find the nearest covariance matrix that is positive semi-definite, and leaves the variance unchanged. |
ROUND.SMALL | Round small values (abs(value)<1e6) in a matrix to zero |
SINGULAR.VALUES | Returns the singular values of a matrix (SVD) |
TRACE | Returns the sum of the diagonal coefficients of a matrix |
UNVEC | Form a matrix from a vector (inverse of the function VEC) |
UNVECH | Form a symmetric matrix (d x d) from a vector of length d(d+1)/2 (inverse of the function VECH). |
VARCOV.MAT | Returns the variance covariance matrix. |
VEC | Takes a square matrix and stacks the columns into a single vector |
VECH | Takes a symmetric d x d matrix and stacks the upper triangular half into a single vector of length d(d+1)/2. |