Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

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)

Arguments

m

a numeric symmetric matrix.

cmax

a positive value, see above.

Value

A list with the following components: inv the inverted matrix, coll TRUE if solve failed because of singularity.

Source

solvecov code was taken from package fpc: Christian Hennig

Author(s)

Christian Hennig

See Also

solve, eigen


mrds

Mark-Recapture Distance Sampling

v2.2.4
GPL (>= 2)
Authors
Jeff Laake <jeff.laake@noaa.gov>, David Borchers <dlb@st-and.ac.uk>, Len Thomas <len.thomas@st-and.ac.uk>, David Miller <dave@ninepointeightone.net> and Jon Bishop
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.