rstan 2.9.0 released or not released depending on your perspective

495 views
Skip to first unread message

Ben Goodrich

unread,
Jan 5, 2016, 1:55:17 PM1/5/16
to Stan users mailing list
A lot of people have been running into problems with rstan installations yesterday and today.
  • Version 2.9 of the Stan Math Library, the other Stan Library, and CmdStan were released before the NIPS conference in early December. However, rstan could not be uploaded to CRAN at that time because CRAN prefers "a month or two" between uploads and rstan 2.8.2 was uploaded on November 26.
  • The StanHeaders R package (which essentially includes the Stan Math Library and the other Stan Library) was uploaded to CRAN January 3 but that is really only relevant to package developers (and had no effect on OpenMx)
  • The rstan package was uploaded to CRAN today, but we have no control on when CRAN will approve it (typically less than a day), when binary versions will be available for Mac and Windows (typically a day or two after approval) or when those binary versions will appear on the CRAN mirror you download from (typically a day or two after the binaries are built).

For most users, rstan is effectively released when a binary is available on their CRAN mirror, in which case 2.9.0 is not released yet. For some users, rstan is effectively released when the source is available, in which case it is perpetually released because the source is always available on GitHub. I suppose you could say rstan is effectively released when the source is tagged on GitHub, which I don't do until CRAN approves it, in which case 2.9.0 is not released yet.


If you are attempting to use Stan today, I would suggest not trying to update an existing installation. Failing that, you can install StanHeaders and rstan 2.8.2 via

devtools::install_url("https://cran.r-project.org/src/contrib/Archive/StanHeaders/StanHeaders_2.8.0.tar.gz")
install
.packages("rstan", dependencies = TRUE)
If you do not want to use rstan 2.8.2 today and are on Windows, you can execute

install.packages("http://win-builder.r-project.org/46ZTjEGxl4O9/rstan_2.9.0.zip",
                 repos
= NULL, dependencies = TRUE)
to install an unofficial but identical to the rstan 2.9.0 binary that would be official if CRAN approves what I uploaded today.
If you do not want to use rstan 2.8.2 today but are not on Windows, you can execute

devtools::install_github("stan-dev/rstan", ref = "develop", subdir = "rstan/rstan")
to install the develop version of rstan, which would be identical to rstan 2.9.0 if CRAN approves what I uploaded today and I can then tag it as v2.9.0.


If you are reading this message more than a few seconds after it was first posted, then some of the above may no longer be operative depending on when you read it.


Ben


David Manheim

unread,
Jan 8, 2016, 2:32:51 PM1/8/16
to Stan users mailing list

Per the CRAN Package check results, it's now up; https://cran.r-project.org/web/checks/check_summary.html (large page.)
(Other than for r-release OS X x86_64 (Mavericks), which is still on 2.8, for some reason.)

Ben Goodrich

unread,
Jan 8, 2016, 7:41:08 PM1/8/16
to Stan users mailing list
On Tuesday, January 5, 2016 at 1:55:17 PM UTC-5, Ben Goodrich wrote:
For most users, rstan is effectively released when a binary is available on their CRAN mirror, in which case 2.9.0 is not released yet.

I think 2.9.0 binaries are available on most mirrors now. The main features of Stan 2.9 were announced in another thread shortly before NIPS. The main new features of rstan 2.9.0 are:
  • Approximate posterior inference via variational inference (see the vb function). We still don't recommend this for final inference, but it can be good for quickly seeing if a model is plausible when you have so much data that evaluating the log-posterior function is slow.
  • There is a save_warmup flag for stan() and sampling()

Each of these new features has a bug

  • vb() will return the wrong results (although the .csv file in tempdir() is correct) when one parameter name is a prefix of another parameter name (e.g. beta and beta_x). To avoid this without renaming your variables, you would have to install rstan from GitHub via devtools::install_github("stan-dev/rstan", ref = "develop", subdir = "rstan/rstan")
  • The documentation for save_warmup is backwards: It actually defaults to TRUE (which is consistent with the <= 2.8.2 behavior) but you can set it to FALSE to possibly avoid some memory errors that people occasionally experience, although any post-estimation function with an inc_warmup argument will fail if inc_warmup = TRUE and stan(*, save_warmup = FALSE).

And there is another bug where expose_stan_functions() will fail to compiled the exposed Stan functions if any of the user-defined functions uses the new slicing syntax, but you can get a fixed version of expose_stan_functions() without installing rstan from GitHub just by executing source("https://raw.githubusercontent.com/stan-dev/rstan/develop/rstan/rstan/R/expose_stan_functions.R")


Finally, rstan 2.9.0 requires ggplot2 2.0 and should avoid the debug bug from 2.8.2.


Ben


Bob Carpenter

unread,
Jan 8, 2016, 8:31:12 PM1/8/16
to stan-...@googlegroups.com
Cool! Worked like a charm for me. And it fixed
the traceplot/ggplot2 issue, as advertised.

- Bob
> --
> You received this message because you are subscribed to the Google Groups "Stan users mailing list" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to stan-users+...@googlegroups.com.
> To post to this group, send email to stan-...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages