stan-dev / stan-dev/shinystan

Problem with LaTeX table: ErrorL subscription out of bounds

Open
#190 6 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
R
Stars
199
Forks
46
PR merge metrics
No merged PRs in 30d

Description

There is an error when generating LaTeX table in shinystan. I've run the model with brms, but this happens when also converting brms code and data to rstan:

library(brms)
library(rstan)
library(shinystan) 

fit <- brm(
    bf(mpg ~ 1 + (1 | cyl) + hp + wt, decomp = "QR"),
    data = mtcars,
    family = gaussian
)

code <- stancode(fit)  
dat <- standata(fit)
fit2 <- stan(model_code = code, data = dat) 
launch_shinystan(fit2) # or `brmsfit` fit

The error only happens when I select Quantile: 97.5%, see pics below:
Screen Shot 2021-02-27 at 06 19 54
Screen Shot 2021-02-27 at 06 20 04

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 running the provided R example with brms, rstan, and shinystan, then select Quantile: 97.5% in the generated table view. Trace the LaTeX table generation entry point from launch_shinystan and identify why that quantile causes the bounds error; done means the table generates successfully at 97.5% without the subscription error.

Written by the indexing model from the issue text.

Assessment

Tech stack
latex, r
Domain
data-visualization
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.