4  Where to find information?

By the end of this section, you’ll have a good sense of the main Stan resources including user guides, tutorials, case studies, and API documentation. We’ll walk through how to match your question to the right resource.


4.1 Different layers of documentation

The Diátaxis framework provides a useful way to think about the different types of content that make up documentation. It divides documentation into four categories:

Type Focus Stan examples
Reference What is this? Function/package index, Stan math docs, Stan reference manual
How-to guides How do I solve this? Vignettes, case studies
Tutorials How do I get started? User’s Guide walkthroughs, example-models
Explanation Why is it like this? Wiki, discussions on Discourse

The four are not a ranking, and no single document has to serve all of them. Most frustration with documentation comes from looking for one kind and finding another.


4.1.1 Reference (“What is this?”)

Dry, complete, factual descriptions of the machinery. Structured for lookup rather than reading front to back.

  • “What is a valid Stan program? What are blocks, types, and constraints, and how do they behave?”
  • “What does normal_lpdf in stan_code do, and what arguments/types does it expect?”
  • “What does loo() in the loo R package do, and what arguments does it take?”
    • see Package index (API) of corresponding downstream package
    • Examples: loo, ShinyStan
    • Analogous to a manual for a specific translation tool

4.1.2 How-to guides (“How do I solve this?”)

Recipes for a specific task, aimed at someone who already knows the basics and has a goal in mind. In the Stan ecosystem these are mostly vignettes, published on each package’s website.


4.1.3 Tutorials / Case Studies (“How do I get started?”)

Guided lessons that take a newcomer through a complete, working example. The goal is not to solve your problem but to build familiarity. The path is chosen for you and is meant to succeed.

4.1.4 Explanation (“Why is it like this?”)

Context, design decisions, and alternatives considered. This is the material you read away from the keyboard, and the only category where opinion and history belong.