I have been working a bit with many short chains, and using nested R-hat as a convergence diagnostic. rhat_nested has an additional argument superchain_ids which is a vector specifying which superchain each chain belongs to. My current workflow is to add the superchain_ids as an attribute to a posterior::draws object, and then do something like
summarise_draws(draws, rhat_nested = ~rhat_nested(.x, superchain_ids = attr(draws, "superchain_ids"))
This is a bit cumbersome, and maybe it could be improved with:
- a new function
add_superchain_ids, which will then add the superchain_ids to the draws object (as an attribute?)
- have
summarise_draws automatically use the stored superchain_ids for rhat_nested
Any thoughts on this? I could make a PR if this seems reasonable
I have been working a bit with many short chains, and using nested R-hat as a convergence diagnostic.
rhat_nestedhas an additional argumentsuperchain_idswhich is a vector specifying which superchain each chain belongs to. My current workflow is to add thesuperchain_idsas an attribute to aposterior::drawsobject, and then do something likeThis is a bit cumbersome, and maybe it could be improved with:
add_superchain_ids, which will then add thesuperchain_idsto thedrawsobject (as an attribute?)summarise_drawsautomatically use the storedsuperchain_idsforrhat_nestedAny thoughts on this? I could make a PR if this seems reasonable