Comparing matrix inversions in R - what is wrong with the Cholesky method?

后端 未结 1 543
臣服心动
臣服心动 2021-01-21 13:43

I compared various methods to compute the inverse of a symmetric matrix:

  • solve (from the package LAPCK)
  • solve (but using a higher machine precision)
相关标签:
1条回答
  • 2021-01-21 14:29

    You need to pass the Cholesky decomposition to chol2inv:

    inv5 = chol2inv(chol(m))
    

    If m is positive definite (which it probably isn't for your not-reproducible input) this should give the same result as the other methods.

    0 讨论(0)
提交回复
热议问题