Stan User’s Guide
Version 2.40

This is the official user’s guide for Stan. It provides example models and programming techniques for coding statistical models in Stan. It does not provide a guide to installing or using any of the interfaces required to use Stan.
Introduction: Outline of the Stan project’s scope and documentation, plus an outline of how Stan works.
Example Models: Stan code and discussions for several important classes of models.
Programming Techniques: A discussion of general Stan programming techniques that are not tied to any particular model.
Posterior Inference and Model Checking: An overview of algorithms for calibration and model checking that require multiple runs of Stan.
Appendices The appendices provide an introduction to the
stanc3compiler used in the various interfaces to Stan, a style guide, and advice for users of BUGS and JAGS.
Download the pdf version of this manual.
Copyright and trademark
Copyright 2011–2025, Stan Development Team and their assignees.
The Stan name and logo are registered trademarks of NumFOCUS.
Licensing
Text content: CC-BY ND 4.0 license
Computer code: BSD 3-clause license