stan-dev / stan-dev/posterior

Add convergence methods for draws objects

Open
#278 19 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

feature
Dominant language
R
Stars
171
Forks
26
Avg merge
2d 18h
Merged PRs (30d)
3

Description

Currently the diagnostic functions rhat, ess_tail and ess_bulk are intended to be used on a single variable matrix or rvar, e.g. as part of summarise_draws. However, they can be applied (incorrectly) to a draws object (all work on draws_array, some work on draws_df too), and then return a single numeric value which is not meaningful.

In contrast rstar takes a multivariate draws object as input and returns an interpretable value. As rhat and rstar are somewhat similar in interpretation, the different expected inputs could be confusing.

Although it is specified in the documentation that these functions expect certain input, maybe it is worthwhile doing some type checking for these functions and returning a warning / error when used incorrectly (especially when used on a draws object) and pointing to summarise_draws.

Example:

ex <- example_draws()
rhat(ex)
# 1.00185 # Not interpretable

rstar(ex)
# 2.066 # Interpretable

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Read the implementations and documentation for rhat, ess_tail, ess_bulk, rstar, and summarise_draws, then reproduce the example with example_draws(). Determine the supported input types and the intended warning or error behavior, and add tests covering draws inputs while confirming summarise_draws remains the suggested path.

Written by the indexing model from the issue text.

Assessment

Tech stack
r
Domain
backend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.