Skip to content

storing superchain_ids for rhat_nested #450

@n-kall

Description

@n-kall

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions