Skip to content

RStan 2.8.0 is on CRAN!

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:

  1. 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.
  2. From within R:
    > install.packages("rstan", dependencies = TRUE)

    I don’t know why you need dependencies, but maybe the RStan gurus can explain.

  3. 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.


  1. Richard McElreath says:

    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?

  2. FatCat says:

    Just Curious: Does this versions support variational inference?

  3. Scott Akenhead says:

    <> 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).

Leave a Reply

Where can you find the best CBD products? CBD gummies made with vegan ingredients and CBD oils that are lab tested and 100% organic? Click here.