Stan Logo

RStan

The R interface to Stan


RStan is the R interface to Stan. It is distributed on CRAN as the rstan package and its source code is hosted on GitHub. Before installation, make sure you have the necessary C++ toolchain for your system by following the instructions in the Getting Started documents below.

Getting Started

For installation instructions and other tips on getting started with RStan see:

Once you have the package up and running some good places to start are:

  • The RStan vignettes show how to fit a model, extract the contents of a stanfit object, and use external C++ code with a Stan program.

  • The majority of the Stan Case Studies include fully worked examples using Rstan.

Several Stan users have also contributed translations of the Getting Started page:

Stan

Stan’s home page with links to everything you’ll need to use Stan’s language and algorithms is:

Source Repository

RStan’s source-code repository is hosted on GitHub.
Stan’s source repository is defined as a submodule (see how to work with stan submodule in rstan repo).

Licensing

RStan is licensed under GPLv3. The Stan code packaged in RStan is licensed under new BSD.