stan-dev / stan-dev/rstan

R crashes during sampling

Open
#1,070 7 comments 1 reaction 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

I'm trying to install rstan to go through Statistical Rethinking, and when I try to verify the installation with example(stan_model, package = "rstan", run.dontrun = TRUE), I get "R encountered a fatal error. The session was terminated". This occurs during the line stan_md> fit <- sampling(mod, data = list(y_mean = 0)) in the console.

This happens whether I install from CRAN or from mc-stan.org. With the second, even though the site suggests I should get 2.26, the version of rstan that comes back from install.packages is 2.21.8, the same as CRAN, so I don't know if that has something to do with it.

I don't know if this is extraneous information, but I have a working installation of CmdStan and CmdStanR, also required for the book. My hunch is there could be some conflict there.

Here's my versions:

Intel macOS Ventura 13.3.1
RStudio 2023.03.1+446
R version 4.3.0
rstan 2.21.8
StanHeaders 2.26.25

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

Reproduce the failure with example(stan_model, package = "rstan", run.dontrun = TRUE) and focus on the sampling(mod, data = list(y_mean = 0)) line. Compare the reported R, rstan, StanHeaders, macOS, RStudio, CmdStan, and CmdStanR versions to determine whether the crash is caused by an installation or compatibility conflict; done means identifying a reproducible cause and a verified resolution.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.