Using PDMats

package

#1

Are there any examples of using the package PDMats? For example, how can I find the inverse of a symmetric positive definite matrix?


#2

The best place to start is the package README, then the sources (which show that methods are defined for Base.inv), so you can just

using PDMats
A = randn(4,4)
B = PDMat(A*A')
inv(B)

That said, are you sure you need an inverse? If you are solving a linear system, you can do it directly with \.


#3

Thank you. I do need to calculate variance-covariance matrices.


#4

This package is awesome. Thank you for posting a question about it so that I could learn it exists!


#5

You are welcome!