Bayesian Model Architect
Kruschke diagrams Β· McElreath notation Β· Guided model building Β· brms export
Β© Dr. Rainer DΓΌsing Β· Interactive Tools by Claude
What you're looking at: on the left, the Kruschke diagram builds your model as a network of distribution curves β€” including the hierarchical structure that arises quite naturally from Bayesian parameter estimation, with every parameter visibly linked by an arrow to its prior. On the right, the McElreath notation translates the same model into compact formulas: every stochastic ("~") and deterministic ("=") relationship, plus all prior assumptions, is spelled out explicitly there. New here? Click πŸ“– Guide above for a step-by-step walkthrough.
1 Likelihood β€” Which distribution?
2 Variables
Predictors
3 Structure
Name of the group index variable in the dataset (e.g. j = schools, person = subjects)
4 Priors
5 Detail level
Model diagram (Kruschke notation)
Ξ± Ξ² Οƒ Hyperprior y "~" = stochastic draw   "=" = deterministic computation
McElreath Notation
β€” click on a node β€”
What is this?
Why this prior?
Tip
brms Model Builder β†’
β„Ή Bayesian Model Architect
Reading and understanding Kruschke diagrams

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 are implemented here only for the first predictor. Once they're active, uβ‚€β±Ό and u₁ⱼ are NOT drawn independently anymore β€” jointly, [uβ‚€β±Ό,u₁ⱼ] ~ MVNormal(0, Ξ£), with an additional correlation ρ between the intercept and slope deviations (brms default).
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.

β†’ brms Model Builder β†—
Further Reading
Kruschke (2014) β€” template for the diagram notation
McElreath (2020) β€” model notation, hierarchical models (Ch. 14)
Finch & Bolin (2024) β€” multilevel models in R
BΓΌrkner (2018) β€” advanced multilevel features in brms
Gelman et al. (2020) β€” Bayesian workflow