rstan 2.9.0 released

12 views
Skip to first unread message

goodrich.ben

unread,
Jan 8, 2016, 8:41:27 PM1/8/16
to stan-announce
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.


Reply all
Reply to author
Forward
0 new messages