storing superchain_ids for rhat_nested
Nobody has claimed this yet.
- Dominant language
- R
- Stars
- 171
- Forks
- 26
- Avg merge
- 2d 18h
- Merged PRs (30d)
- 3
Description
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 thesuperchain_idsto thedrawsobject (as an attribute?) - have
summarise_drawsautomatically use the storedsuperchain_idsforrhat_nested
Any thoughts on this? I could make a PR if this seems reasonable
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading rhat_nested and summarise_draws to understand how superchain_ids are currently passed. The issue needs a decision on whether to add an add_superchain_ids function, store the values as an attribute, and have summarise_draws use them automatically. Done means the API and automatic behavior are agreed and implemented consistently.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- r
- Domain
- data
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100