stan-dev / stan-dev/rstan

sbc doesn't grok nested loops to determine parameter names

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

Nobody has claimed this yet.

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

Description

Summary:

sbc assumes that parameters are examined serially in the rank_ output.

Description:
  for (fx in 1:NFACETS) {
    for (tx in 1:NTHRESH) {
      pars_[px] = threshold_[fx,tx];
      ranks_[px] = threshold[fx,tx] > threshold_[fx,tx];
      px += 1;
    }
    pars_[px] = factorProp_[fx];
    ranks_[px] = factorProp[fx] > factorProp_[fx];
    px += 1;
  }

ranks_ columns will be mislabeled. sbc will incorrectly infer that all thresholds are examined and then all factorProp instead of being interleaved. Given the limitations of the current Stan language, I'm not sure how to fix it, but it needs to be documented better.

RStan Version:

GIT 7f2de6f2dd748 (May 19 2019)

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 examining how sbc infers parameter names from the rank_ output, then reproduce the nested-loop example with interleaved threshold and factorProp assignments. Done means the rank_ columns are labeled in the actual generated order, or the limitation and required ordering are documented clearly.

Written by the indexing model from the issue text.

Assessment

Tech stack
r
Domain
testing-qa
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.