BayesianTools icon indicating copy to clipboard operation
BayesianTools copied to clipboard

DREAM and DREAMzs: updateInterval must be >= nCR?

Open jds485 opened this issue 5 years ago • 1 comments

I've found that specifying the updateInterval to be less than nCR results in an error from line 398 in mcmcDREAMzs.R, which is a loop over (k in 1:settings$nCR): ind <- which(abs(CR[,k]-(k/nCR)) < 1e-5)

The error happens because CR is set to have column length equal to updateInterval instead of nCR in line 200: CR <- matrix(1/nCR, nrow = Npop, ncol = settings$updateInterval)

It seems like ncol = settings$nCR should be used in line 200, which would allow for nCR and updateInterval settings to not have this dependency, at least in the DREAMzs function. I think some instances of updateInterval would also need to be changed to nCR in the generateCRvalues function, and possibly other functions.

jds485 avatar Jun 03 '20 18:06 jds485

Hi Jared,

thanks for reporting this - I have to admit that I am currently overwhelmed with things, so that various issues in BT have piled up at the moment that should be resolved. I will try to resolve this as fast as possible.

Best, Florian

florianhartig avatar Jun 03 '20 19:06 florianhartig