stan-dev / stan-dev/posterior

Support for non-equal MCMC chain lengths

Open
#449 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Background

Some MCMC samplers produce chains of unequal length (e.g., WALNUTS). Currently, the posterior package does not support this case. This issue outlines some initial ideas for how to handle it.

Proposed options
  • Option 1: Thin chains to equal length Automatically thin longer chains to match the shortest chain length.
  • Option 2: Equal-length storage with NA padding Store chains in the existing equal-length format but pad shorter chains with NA values. New utility functions or arguments would be added to support working with padded draws.
  • Option 3: Native support for non-equal chain lengths Support natively stored chains of different length.

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

Start by reviewing how the posterior package currently stores equal-length MCMC chains and how existing utilities consume those draws. Compare the three proposed approaches—thinning, NA padding, and native unequal-length storage; the work is complete only after one approach is selected and its storage and utility behavior are defined.

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
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.