Cholesky decomposition failed for precision/covariance matrix

Thank you for the reply and suggestions! Yes I had some mis-specification before.
One thing to clarify: so cholesky_factor_cov is also for cholesky factor for precision matrix (and covariance matrix) ? (this is not relevant to this topic but might make things easier for my model)

Thank you!

Yes, if you declare:

cholesky_factor_cov[N, N] L_Sigma;

then you get a default uniform distribution over the the lower triangular matrices L_Sigma such that L_Sigma * L_Sigma' is symmetric positive definite. All that’s required of a precision matrix is that it’s symmetric positive deifnite.

The problem is that Stan doesn’t have a multi_normal_prec_cholesky that takes a Cholesky factor parameterization of the precision matrix.

1 Like