Fixes for JAGS 5.0.0 #56
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
With the forthcoming release of JAGS 5.0.0 I am testing CRAN packages to make sure they will still work with the new release. The jagsUI package is one of the main interfaces to JAGS from R and is a high priority. This pull request fixes issues with JAGS 5.0.0 and is back-compatible so that jagsUI still works with the current release version of JAGS and rjags.
The main change for jagsUI is that likelihood-based diagnostics have been moved into the new
diagmodule. Thedicmodule still exists as a stub. It is harmless to load and unload it in JAGS 5.0.0 but also it does nothing. In rjags_5-1 (not yet on CRAN), and also the command line interface to JAGS 5.0.0, thediagmodule is loaded by default. My recommendation is that you do the same for jagsUI. The main reason for this (apart from diagnostics being very important) is that users have become used to setting a monitor for "deviance" without loading any additional modules. This monitor is now in thediagmodule so default loading ofdiagmaintains backwards compatible behaviour. Thediagmodule contains no functions, distributions, or samplers, so does not affect modelling.Another minor change is that the precedence of the
bugs::BinomSlicefactory has changed and this required modifications to one of the tests.The test of autojags terminates more quickly with JAGS 5 so I also had to change this test. I think this test is quite fragile as I cannot guarantee stable behaviour across versons of JAGS.
I am using
rjags::jags.versionto detect the version of the JAGS library and make conditional changes to the code. This preserves back-compatibility with JAGS 4. Sincejags.versionwas introduced with rjags version 4 this means the patched jagsUI package is no longer compatible with JAGS 3 so I have bumped the minimum rjags version in the DESCRIPTION file.Thank you for all your work providing a user-friendly interface to JAGS.