stan-dev / stan-dev/rstan

make advi and mcmc output compatible at CSV level

Open
#239 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
R
Stars
1.1k
Forks
266
Avg merge
2h 56m
Merged PRs (30d)
1

Description

A request from Guido Biele on the Stan users list:

Would it be possible to modify read_stan_csv so that it can also read cmdstan csv files generated from advi estimation?

To which Ben Goodrich replied:

Not easily, due to the irregularities in the csv files produced by MCMC. We ended up writing an entirely separate CSV reader for ADVI called read_one_stan_csv that you can download from GitHub. By itself, it does not create a stanfit object, but there is not much to do with the ADVI output except calculate means and stuff.

We should try to aim in Stan 3 for having the output files be compatible. I would like to stress again here that I think the way to do this is have a simple standard CSV format for the draws without any metadata. Bigger data structures can then encapsulate that data structure. Not quite sure how this'll shake out through the refactorization.

Contributor guide

No contributing guide indexed for this repository

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 comparing the existing read_stan_csv and read_one_stan_csv readers and the ADVI and MCMC CSV output described in the issue. Clarify the proposed common draws-only CSV format and how it should fit the Stan 3 refactor; done means both output types can be consumed compatibly without losing their required data.

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
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.