Page 1 of 1

[SOLVED] Gibbs Sampler Error

PostPosted: Fri Nov 04, 2016 8:00 pm
by niafall
I am using the gibbs sampler (gibbs) to generate a normal distribution from an anamorphosis transformed, truncated distribution. In most cases (I am running this for many fish surveys) it works perfectly, but in one case I get the following error:

Code: Select all
Error in the matrix inversion : Pivot #2 is null
Error during the covariance matrix inversion

The function is interrupted
Error: Error in R_gibbs


Can anyone help with this?

Re: Gibbs Sampler Error

PostPosted: Fri Nov 04, 2016 11:24 pm
by Didier Renard
The only possible reason for such a behavior is the presence of duplicate which make the covariance matrix singular.
Please use db.duplicate to check.

Re: Gibbs Sampler Error

PostPosted: Sat Nov 05, 2016 1:35 am
by niafall
Thanks, Didier!

I did indeed find a duplicate record; it's working now.