stan-dev / stan-dev/rstanarm

Running stan_surv() with example data crashes both R and RStudio

Open
#508 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
R
Stars
401
Forks
136
PR merge metrics
No merged PRs in 30d

Description

RStanARM Version:

2.21.2

R Version/Operating System:

R version 4.0.5 Ubuntu 20.04

I installed rstarnarm with:

install.packages("rstanarm", repos = c("https://mc-stan.org/r-packages/", getOption("repos")))

Running the following code causes both R an RStudio to crash. No error messages are reported. I have fresh installation of both R, rstan and rstanarm.

library(rstanarm)
library(simsurv)
covs <- data.frame(id  = 1:200, 
                   trt = stats::rbinom(200, 1L, 0.5))
d1 <- simsurv(lambdas = 0.1, 
              gammas  = 1.5, 
              betas   = c(trt = -0.5),
              x       = covs, 
              maxt    = 5)
d1 <- merge(d1, covs)
f1 <- Surv(eventtime, status) ~ trt
m1a <- stan_surv(f1, d1, basehaz = "ms",       chains=1,refresh=0,iter=600)

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 simsurv and stan_surv example on the stated R and Ubuntu versions, then trace the stan_surv entry point to identify where the process crashes. Done means the example no longer crashes and a regression check covers this case.

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
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.