Skip to content

Conversation

@martynplummer
Copy link
Contributor

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 diag module. The dic module 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, the diag module 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 the diag module so default loading of diag maintains backwards compatible behaviour. The diag module contains no functions, distributions, or samplers, so does not affect modelling.

Another minor change is that the precedence of the bugs::BinomSlice factory 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.version to detect the version of the JAGS library and make conditional changes to the code. This preserves back-compatibility with JAGS 4. Since jags.version was 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.

@kenkellner
Copy link
Owner

Looks great, thanks for making this easy for me. I'll plan to submit an update to CRAN this week.

@kenkellner kenkellner merged commit 9b57a1f into kenkellner:master Jan 7, 2026
3 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants