Closed gregorsteiner closed 8 months ago
Sorry, I just saw this. Did you manage to address the issue?
No worries, I managed to fix the issue in this case by wrapping the covariance matrix in PDMat(Symmetric( ))
, but I have encountered a few versions of this problem. I should have probably posted this in Distributions.jl or StaticArrays.jl, but it seems that they are already aware of this issue: https://github.com/JuliaStats/Distributions.jl/issues/1826 and https://github.com/JuliaArrays/StaticArrays.jl/issues/1218. Many thanks!
Hello,
I am trying to implement a simple Bayesian Model Averaging procedure. When I use a g prior on the coefficient vector in a linear model, I keep getting this error: PosDefException: matrix is not Hermitian; Cholesky factorization failed.
When I wrap the covariance matrix with
Symmetric()
orHermitian()
, I get this error instead: PosDefException: matrix is not positive definite; Cholesky factorization failed. However, when manually checking the eigenvalues, they are all positive.The solutions suggested in here or here did not help. A similar problem has been solved here, but I am not sure how to use that solution within a Turing model.
My code is below, any help would be highly appreciated. Thank you!