Also move the below line to generated quantities. There’s no need to construct this matrix anymore unless you want to look at it.
corr_matrix[M] Omega = multiply_lower_tri_self_transpose(L_Omega);
In addition, I think it makes sense to try the cholesky_decompose
on new_cov
and call multi_normal_cholesky
instead of multi_normal
.