donaldRwilliams / BGGM

Bayesian Gaussian Graphical Models
https://donaldrwilliams.github.io/BGGM/
GNU General Public License v2.0
54 stars 14 forks source link

Estimate error with type = mixed #85

Open tsbaguley opened 2 years ago

tsbaguley commented 2 years ago

I keep getting this error if I try to use type="mixed".

fit_oc <- estimate(dvp_oc, type = "mixed", prior_sd = 0.25) BGGM: Posterior Sampling 0% 10 20 30 40 50 60 70 80 90 100% [----|----|----|----|----|----|----|----|----|----| **| Error in estimate(dvp_oc, type = "mixed", prior_sd = 0.25) : wishrnd(): given matrix is not symmetric positive definite

The variables have a lot of missing data so I've also tried bggm_missing where I get this (sometimes straight away and sometimes not):

Error in estimate(as.matrix(subset(Y, .imp == x)[, -1]), iter = iter, : wishrnd(): given matrix is not symmetric positive definite

Any advice on what might be causing it?

The models estimate Ok with type-continuous, but have a mix of continuous, ordinal and binary vars (coded as ordinal).

donaldRwilliams commented 2 years ago

hi. I am not sure. it might just be too much that it is having a hard time sampling. Ill take a look on my end