Learn R Programming

mrds (version 2.3.0)

solvecov: Invert of covariance matrices

Description

Tries to invert a matrix by solve. If this fails because of singularity, an eigenvector decomposition is computed, and eigenvalues below 1/cmax are replaced by 1/cmax, i.e., cmax will be the corresponding eigenvalue of the inverted matrix.

Usage

solvecov(m, cmax = 1e+10)

Value

A list with the following components: inv the inverted matrix, coll

TRUE if solve failed because of singularity.

Arguments

m

a numeric symmetric matrix.

cmax

a positive value, see above.

Author

Christian Hennig

See Also

solve, eigen