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.