Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DREAM and DREAMzs: updateInterval must be >= nCR? #205

Open
jds485 opened this issue Jun 3, 2020 · 1 comment
Open

DREAM and DREAMzs: updateInterval must be >= nCR? #205

jds485 opened this issue Jun 3, 2020 · 1 comment
Labels
Milestone

Comments

@jds485
Copy link

jds485 commented Jun 3, 2020

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.

@florianhartig
Copy link
Owner

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants