Stan Functions Reference
Version 2.21
Overview
This is the reference for the functions defined in the Stan math library and available in the Stan programming language.
The Stan project comprises a domain-specific language for probabilistic programming, a differentiable mathematics and probability library, algorithms for Bayesian posterior inference and posterior analysis, along with interfaces and analysis tools in all of the popular data analysis languages.
In addition to this reference manual, there is a user’s guide and a language reference manual for the Stan language and algorithms. The Stan User’s Guide provides example models and programming techniques for coding statistical models in Stan. The Stan Reference Manual specifies the Stan programming language and inference algorithms.
There is also a separate installation and getting started guide for each of the Stan interfaces (R, Python, Julia, Stata, MATLAB, Mathematica, and command line).
Interfaces and Platforms
Stan runs under Windows, Mac OS X, and Linux.
Stan uses a domain-specific programming language that is portable across data analysis languages. Stan has interfaces for R, Python, Julia, MATLAB, Mathematica, Stata, and the command line, as well as an alternative language interface in Scala. See the web site https://mc-stan.org for interface-specific links and getting started instructions
Web Site
The official resource for all things related to Stan is the web site:
The web site links to all of the packages comprising Stan for both users and developers. This is the place to get started with Stan. Find the interface in the language you want to use and follow the download, installation, and getting started instructions.
GitHub Organization
Stan’s source code and much of the developer process is hosted on GitHub. Stan’s organization is:
Each package has its own repository within the stan-dev
organization. The web site is also hosted and managed through GitHub.
This is the place to peruse the source code, request features, and
report bugs. Much of the ongoing design discussion is hosted on the
GitHub Wiki.
Forums
Stan hosts message boards for discussing all things related to Stan.
This is the place to ask questions about Stan, including modeling, programming, and installation.
Licensing
- Computer code: BSD 3-clause license
The core C++ code underlying Stan, including the math library, language, and inference algorithms, is licensed under the BSD 3-clause licensed as detailed in each repository and on the web site along with the distribution links.
Acknowledgements
The Stan project could not exist without the generous grant funding of many grant agencies to the participants in the project. For more details of direct funding for the project, see the web site and project pages of the Stan developers.
The Stan project could also not exist without the generous contributions of its users in reporting and in many cases fixing bugs in the code and its documentation. We used to try to list all of those who contributed patches and bug reports for the manual here, but when that number passed into the hundreds, it became too difficult to manage reliably. Instead, we will defer to GitHub (link above), where all contributions to the project are made and tracked.
Finally, we should all thank the Stan developers, without whom this project could not exist. We used to try and list the developers here, but like the bug reporters, once the list grew into the dozens, it became difficult to track. Instead, we will defer to the Stan web page and GitHub itself for a list of core developers and all developer contributions respectively.