RStan 2.8.0 is available on CRAN!
Installation directions can be found on RStan’s Wiki.
And since I know a lot of people aren’t patient enough to read through installation instructions, the most important parts are:
- You (still) need a C++ toolchain.
Mac: XCode. Make sure to open it once after download to accept the license.
Windows: Rtools. Make sure the binaries are on your Windows path.Linux. If you don’t have a C++ toolchain in Linux, you should probably rethink your operating system. - From within R:
> install.packages("rstan", dependencies = TRUE)
I don’t know why you need dependencies, but maybe the RStan gurus can explain.
- Restart R before using RStan. Please.
This is another thing that I don’t understand, but it does solve a lot of problems.
As always, if you run into trouble, let us know on the stan-users mailing list.
Cool.
I suspect the dependencies thing arises from linking to, but not importing from, StanHeaders. So without dependencies=TRUE, it won’t also install StanHeaders, and then rstan won’t be able to compile any models?
Yeah, that’s right, but not just for StanHeaders. It’s the same for any other package that only contains header files (e.g. bh).
I’m pretty sure that’s not true – the default will install all linking to packages.
You’re right about the default behavior of install.packages, which means I’m forgetting why exactly dependencies=TRUE is necessary. It does seem to resolve many of the installation errors people report.
I think that for binary packages only, the default dependencies=NA omits LinkingTo. https://stat.ethz.ch/R-manual/R-devel/library/utils/html/install.packages.html
Just Curious: Does this versions support variational inference?
Not yet. We were intending to include it in 2.8.0, but eventually decided more testing was necessary. For now it’s still only available in CmdStan.
Boo hoo. Sniff Sniff.
<> I deal with models where the likelihood surface is “rough” enough that HMC cannot properly determine the local gradient. As in, I started sampling at 0300h Sunday and expect results 1200h Tuesday. I am hoping that variational in rstan will be a big help given that it is robust to “rough estimates” of the gradient. Results in 2 minutes instead of 2 days!
Not having to figure out how to use CmdStan (make, stan_rdump, Mac’s Terminal, etc.) would be a Thanksgiving treat (hint, hint).