vetr.dev

Stan Studio

Explore · simulate · translate

Follow a model from priors to predictions. Explore its dependencies, adjust a prior, or translate it into code. Everything runs on your device.

Stan model

⌘ / Ctrl Z · ⇧ Z
Data & posterior draws JSON

Draw numbers start at 1. Use CmdStan column names such as theta[1]. The output embeds the selected parameter draw; it reads observed data from an R list named dat.

Model specification

Original model

Equations follow source order. Select an equation to expand its node. Normal uses mean and variance.

Export this model

Ready

How to use the result

The explorer uses Stan’s type checker and a supported generative subset: scalar/vector priors, deterministic transforms, and sampled data. It reports unsupported constructs explicitly. Expand nodes to adjust prior arguments or fix parameters, including hyperparameters. Multiple nodes can stay open together. These exploration changes leave the Stan source untouched; LaTeX and Python exports include them.

Prior predictive histograms are independent Monte Carlo draws, not posterior estimates. No analytic approximation or MCMC fitting is performed. Shared plates mark repeated elements; scalar parents stay outside. Show sizes & data bounds adds structural inputs and dashed arrows. Small edge jumps mark crossings rather than connections. Fixing a node is an intervention in the generative graph, not conditioning a fitted model.

R exports translate the original Stan source, without graphical scenario changes. Define dat in R, then run the downloaded script. Its out list contains the model’s top-level variables. Density modes return ordinary densities or probabilities, not log densities. The R converter supports more Stan constructs than the explorer.

The first successful conversion downloads the R runtime. Later conversions reuse it. Internet access is needed for this initial download. Stan Studio reports unsupported constructs instead of silently omitting them. Provide a self-contained Stan model; external #include files are not supported here.

API & CLI · Stan2R source