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.
@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.
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 :)
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.
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’
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.
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.
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.
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 ;)
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?