hi Andrew,
This isn't something we've considered. WAIC is calculated based on the full likelihood from all contributions to the likelihood, however they appear in the model, i.e., based on what nodes are flagged as data.
There's no way to do that currently that I can see. One potential approach would be to modify some of nimble's code (from the `MCMC_WAIC.R` file) to calculate your desired WAIC offline (i.e., after running the MCMC).
I think what you'd need to do is:
- modify the `buildOfflineWAIC` nimbleFunction in `MCMC_WAIC.R` to only use a subset of data nodes (by having `dataNodes` be an argument to the `setup` function rather than being obtained from `model$getNodeNames(dataOnly = TRUE)` in lines 29-30 of `MCMC_WAIC.R`.
- modify `calculateWAIC` (in lines 545-551 of `MCMC_WAIC.R`) to run the new `buildOfflineWAIC` once for each set of data nodes and then calculate and return WAIC for each set.
Happy to iterate if you want to take a try at it and have questions/problems.
-chris