decomp.cov: Calculates decomposition of covariance matrix
Description
Calculates a decomposition of the provided covariance matrix, V, using the chosen method.
Usage
decomp.cov(V, method = "eigen")
Value
Returns a decomposition matrix U such that V = U %*% t(U).
Arguments
V
A (symmetric, positive-definite) covariance matrix.
method
A character vector specifying the method used to decompose V. Options are "eigen", "chol", or "svd" (Eigen decomposition, Cholesky decomposition, or Singular value decomposition, respectively).
Author
Joshua French
Details
The matrix V is assumed to be symmetric and positive definite. Symmetry is checked, but the positive definiteness of the matrix is not. Returns a decomposition matrix U such that V = U %*% t(U).