This tool shows you the graphical model structure of Bayesian regression models — live, interactive, in simple examples:
· ○ open circles = unknown parameters that need priors (α, β, σ)
· □ rectangle = observed data y
· • dot = deterministic node (μᵢ) — no prior, computed from inputs
· Arrows show the generative direction: Prior → Parameter → Data
· Plates (dashed frames) mark repeated units (i = 1…N observations; j = 1…J groups)
In the hierarchical model, each group j receives a deviation from the global intercept: u₀ⱼ ~ Normal(0, τ₀). τ₀ controls the degree of partial pooling — small τ₀ = strong shrinkage. In McElreath (Ch. 14, p. 441 ff.) this parameter is called σ_α. Random Slopes (u₁ⱼ ~ Normal(0, τ₁), corresponding to McElreath's σ_β) are implemented here only for the first predictor, to illustrate the diagram principle.
Simple example models only: up to 4 predictors, one group structure, 5 likelihoods. The focus is on structure, not full model complexity. Click on any node in the diagram for an explanation.
📖 Guide — Step-by-step (top). Recommendation: read through first! 💡 Explanations — Click on nodes or formula rows on the right for context on each parameter. ⬡ Golem light — Generates R code: draw parameters from priors and simulate data.
For the full model scope: ⬡ brms Model Builder — 15 likelihoods, polynomials, interactions, distributional parameters, random effects, prior predictive check — directly executable brms code.