For Cholesky factors that big, it is possible that the diagonal elements result in the square root of a slightly negative number when symbolically they should be slightly positive. If you search for the “onion method” on the Stan-users Google group, there is some code for a more numerically stable way to construct a Cholesky factor of a large correlation matrix.
bgoodri
2
Related topics
| Topic | Replies | Views | Activity | |
|---|---|---|---|---|
| Cholesky_factor_corr initializing with invalid values | 8 | 3055 | July 14, 2021 | |
| Error when specfying initial values for cholesky factor | 1 | 387 | April 14, 2020 | |
| L cholesky factor gets NA for fit | 0 | 326 | January 5, 2023 | |
| Error transforming variable L: lub_free: Correlation variable is nan, but must be in the interval [-1, 1] | 3 | 744 | April 15, 2019 | |
| Bad LKJ Initialization in model from "Fast hierarchical Gaussian processes" | 2 | 1497 | March 22, 2018 |