Is rstan still alive?

Hi all,

As the title suggests, is rstan still alive?

I see that the CRAN version was updated this year, but it still uses Stan 2.21. In the past years, I used rstan from Repository for distributing (some) stan-dev R packages | r-packages, I’m not entirely sure when it was updated for the last time, but the dev branch of the github page hasn’t been updated since 2021. In the meanwhile, Stan has moved to version 2.32.

I know that devs now recommend cmdstanr (and I have been using it as well), but we are doing the last round of revisions to our book An Introduction to Bayesian Data Analysis for Cognitive Science that relies on rstan, and the question is… will rstan still exist? Or are we about to release a book that’s already outdated?

To be honest, I really hope to listen that rstan is well and a new version is ready, I’m really not looking forward to adapt the all the relevant R code, and I also don’t love that cmdstanr uses R6, since for most of our audience, it is completely unknown.

2 Likes

@andrjohns knows more about the latest developments and the future timeline than I do, but it’s not dead. In fact there’s been a major development: @bgoodri just submitted StanHeaders 2.26 to CRAN recently (up from 2.21) and that needed to happen to make it possible to submit 2.31 soon. Then RStan would follow (it relies on StanHeaders). So there actually will be a release getting RStan up to date with CmdStan.

4 Likes

rstan updates have been ‘coming soon’ for years now… projects struggle, no worries, but the lack of clarity for the community is pretty disappointing… hopefully this time it’s real :)

1 Like

It has definitely taken much much longer than anyone would like for various reasons, but StanHeaders 2.26 was just accepted by CRAN recently (CRAN - Package StanHeaders), so there’s actual progress on this.

3 Likes

As resources are limited, and working within R and Cran makes life harder than it need be, shouldn’t we back the winner (CmdStan) and gracefully retire the interfaces that are more than just a wrapper? Just thinkin’

3 Likes

Please, not cmdstanr.

RStan allows us to support pre-compiled models in R packages. Packages like rstanarm can be installed as binaries from CRAN without the user needing a C++ toolchain.

3 Likes

Well, this is a jolly good reason. Hadn’t thought of that. We could also share pre-compiled executables from CmdStan, although I recognise the cybersecurity implication, to put it mildly. I wonder whether could be, at least in theory, some kind of repository of pre-compiled models that users share. Priors would have to go in as “data”. Again, just thinking out loud on a warm day when my brain is possibly not running at full power.

2 Likes

Yeah I’ve also wondered about that. Could be useful.

1 Like

Also some IT security protocols makes require the package to be on CRAN. I know I had a job where if it wasn’t on CRAN then I couldn’t use it.

4 Likes

Agreed. For the computers that I work on, it is much easier if on CRAN. I’ve yet to be able to install cmdstan on these machines, so I use rstan for everything on them.

1 Like

CRAN can be painful but as I prep material for a summer school next week, I’m pretty thankful that I can just post a few lines of code and things will largely work for people. No chance of this once we get into compiler issues. Rstan is the only thing stopping me learning Julia ;)

4 Likes

One question I had about cmdstanr: when using cmdstan from the command line, you have to write things to a csv file first. It doesn’t seem like cmdstanr has that requirement (like rstan). How do they get around that?

cmdstanr writes its output to csvs (by default in an R tempdir) and then automatically reads them back into memory upon completion.

1 Like

Thanks!