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?

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.