It seems this topic keeps coming up over and over again (see here and here), with a lot of efforts to resolve it but it gets stuck.
My code is reliant on using MvNormal
for sampling. I could write my own code that checks if the covariance matrix I am using is positive definite or positive semi-definite. Then create my own special constructor for MvNormal
in the degenerate case and my own rand
method, but I feel very uneasy about overwriting a package.
Is there a cleaner way to do this?