A New parameterization of Correlation Matrices

I have been playing with the code provided here [1] of a way to simulate correlation matrices that ensures that they are positive definite. I was curious if it would be possible to implement something like this in Stan.

the code in the link requires a function to take a matrix exponential and I’m not seeing a built-in function for that in Stan. It looks like implementing matrix exponential in the diagonalized case would require calculating the eigenvectors in each iteration, which might be slow.

Any idea if this is a waste of time or worth trying?

[1] A New parameterization of Correlation Matrices

2 Likes

I thought this isn’t new, I knew about this last year! But it was the working paper version! I linked to it in Correlation Cats Part I – The Stan Blog.

1 Like

Let me reread this, I believe it would be interesting to have matrix exponential exposed and this method tested.

Matrix exponential is exposed but it may be faulty.

1 Like

Is this yet another approach?

2 Likes

nice find, I’ll have to read through to see how the author implements this. The Stiefel space is not bijective with Euclidean and it can be quite difficult to implement in a way that is robust. There’s an open issue on github discussing this add Givens-based orthonormal matrix transform and inverse plus Jacobian · Issue #2590 · stan-dev/math · GitHub.

3 Likes

@FanqiMeng is your StanStiefel package online anywhere?

Very interesting! I am new to Stiefel manifolds. Geometry was never my thing though my first degree was math I just loved those stats too much. But now it is firmly in my sights for ongoing learning.

@mike-lawrence @spinkney can you recommend any primers? I have a copy of this book although I have yet to grapple with it, and it doesn’t have Stiefel in the index.