≡ Contents
Start 0 — Foundations Models I — LM → GLMM Bayes II — Intuition III — Small Worlds IV — Workflow Decision V — Decision
Interactive Statistics · Open Source

Learn Bayesian
thinking,
build models.

Why do new data change my beliefs? What is a prior? How do I specify a hierarchical model in R? This lab answers these questions — interactively, visually, and directly applicable with brms.

μα σα j = 1…J αj β i = 1…N μᵢ = σ y
Undergraduate
Graduate / MSc
PhD & Research
Applied Science
Clinical Research

A complete
learning path.

19 interactive tools — from linear models to posterior decision-making. Every tool runs entirely in the browser, with no installation, no data transfer. Copy-ready R code (brms) at every step of the workflow.

Inspired by McElreath Statistical Rethinking and Kruschke Doing Bayesian Data Analysis. Suitable for undergraduates, graduate students, and researchers alike.

0–I
Statistical Foundations & GLMs
OLS, residuals, maximum likelihood, link functions, conditional distributions, mixed models, ordinal logit, zero-inflation. 6 tools — no Bayesian background required. An ideal entry point and reference for all levels.
II
Bayesian Intuition
What is a prior? How does a posterior emerge? How does MCMC sample? 4 tools build genuine intuition — from qualitative updating through prior selection to analytical credible interval bands.
III
Small Worlds
"Small Worlds" after McElreath (Statistical Rethinking, Ch. 2): constructing models as simplified, consistent representations of reality. Golem Builder: draw DAGs, identify causal structure (confounders, colliders, d-separation), simulate data, export brms and glmmTMB code. Data Creator: parametric data generation for all designs and likelihoods, with simulation-based power analysis for R.
IV
Bayesian Model Workflow
Kruschke diagrams, brms code generation with prior sliders, prior and posterior predictive checks, and LOO-based model comparison. The full cycle from prior specification to a validated model.
V
Posterior Decision
HDI, ETI, and ROPE: three parallel decision logics. First explore concepts interactively (Decision Lab), then load your own posterior draws, apply transformations (Cohen's d, Odds Ratios), and export for publications (Decision Maker). For causal effects: G-Computation via the Causal Calculator estimates ATE, ATT, and ATU on the correct scale.
How to use this lab
Navigate via the color-coded sections in the menu above (0–V) or scroll through the learning path from top to bottom.
Click ℹ Help in each section header for learning objectives, prerequisites, and the recommended order of tools.
Follow the flow arrows → between sections or jump directly to the tool you need right now.
0 — Statistical Foundations
Foundations

Statistical Foundations

Three conceptual entry-point tools — no R, no Bayes. What is regression? How does maximum likelihood work? And why does the linear model not always suffice? An ideal start for anyone building Bayesian intuition from the ground up.
Learning path ① Interactive LM ② Maximum Likelihood ③ LM to GLM Section I: GLM & GLMM
📐
Regression Residuals OLS no R
Linear Model interactive
Draw data points yourself, fit a line manually — then see the optimal OLS line at the click of a button. What are residuals? Why does OLS minimize RSS? And what does it mean for the scatter around the line to be normally distributed?

Includes conditional normal distributions along the line and a live comparison of your RSS vs. the OLS minimum.
Likelihood MLE Log-Likelihood no R
Maximum Likelihood
Likelihood ≠ probability — this distinction becomes experientially clear here. Slide a distribution over the data and watch when the density at the data point is maximized — that is MLE.

Three stages: one data point → many data and the likelihood landscape → three families (Normal, Poisson, Bernoulli) with AIC/BIC comparison.
🔀
GLM Link function AIC no R
LM to GLM
What happens when you apply a linear model to binary, count, or skewed data? Three scenarios show the problem — and how GLMs solve it with the right distribution and link function.

Fair AIC comparison LM vs. GLM, visual link function explanation, direct link to the GLM tools in Section I.
Regression foundations established → continue with GLM, GLMM, and mixed models
I — From LM to GLMM
Entry (G)LMMs

From LM to GLMM

These three tools extend the linear model step by step — from conditional distributions in the GLM through to mixed models with partial pooling. Recommended after Section 0.
📊
GLM Tutorial Ordinal Logit ZIP · Hurdle
Conditional Distributions
What does it mean for y|x to be normally distributed? This tool visualizes conditional distributions along a predictor — the core of every GLM. Interactively adjustable parameters show how mean and spread shift.

Covers all major GLM families: Gaussian, Bernoulli, Poisson, Gamma, Ordinal Logit, Zero-Inflated Poisson, and Hurdle models — each with its own dedicated tab.
🧊
GLM 3D Visualization
GLM in 3D
Linear regression in three dimensions: regression surface, residuals, and data points in space. Spatial thinking about regression models with multiple predictors becomes literally visible.
🔗
GLMM Multilevel Tutorial
GLMM interactive
What is partial pooling? Why are mixed models better than separate group analyses? This tool shows the difference between complete pooling, no pooling, and partial pooling visually and interactively.
With this foundation → build Bayesian intuition
II — Bayesian Intuition
Bayes

Learn to think

Four tools build Bayesian intuition step by step: from qualitative updating through the posterior sampling algorithm to concrete prior selection. No finished model, no statistics software — just understanding.
🧠
Simulator 8 scenarios No prior knowledge needed
Bayesian Thinking Simulator
✓ No math background needed ✓ All levels ✓ Ideal starting point
The best starting point. Eight psychological scenarios make Bayesian updating tangible: What do I believe before the experiment? What do the data say? How does my posterior change? No software, no formulas — just building intuition.
🎛
Interactive Tutorial 10 distributions CI-Solver
Prior Lab
Before specifying priors in brms, you need to understand what a distribution implies. Ten distributions, interactive parameters, real-time 95%-CrI shading.

CI-Solver: Specify the range in which 95% of your prior beliefs should fall — the tool computes the parameters back. Includes brms syntax and clickable defaults.

GLM Mode: Scale transformation via mathematically exact Jacobian transformation — not an approximation.
Interactive Tutorial 3 stages Metropolis-Hastings
MCMC Visualizer
How does the computer find the posterior? An animated hiker explores the posterior landscape — every step, every proposal visible.

Three stages: uni- and bimodal posterior, then 2D for μ and σ. Especially helpful when convergence problems arise later.
Interactive Prior · Likelihood · Posterior
Bayes interactive
Choose a prior, generate data, watch the posterior emerge. How strongly does the prior influence the result? When does the posterior become independent of the prior?

Live visualization of prior, likelihood, and posterior — the core mechanism of Bayesian learning as a direct experience.
Bayesian intuition → build Small Worlds
III — Small Worlds
Simulation & Causality

Small Worlds

Named after Richard McElreath (Statistical Rethinking, Ch. 2): models are "small worlds" — simplified representations of reality. These tools help build such small worlds: sketch causal structures as DAGs, generate data parametrically, and plan sample sizes — before real data are collected.
🔮
DAG Builder dagitty logic Simulation brms · glmmTMB
Golem Builder
Build DAGs graphically and evaluate them causally: which variables must be controlled (confounders), which must not (colliders), which increase precision? Derive testable implications (d-separation) directly.

Simulation & Code: Quantify relationships, simulate data from the DAG, and copy generated brms and glmmTMB analysis code directly. Exactly following McElreath.
🧪
Data generation Between · Within · Mixed GLM families Power analysis
Data Creator
Parametric data generation for all common designs: between-subjects, within-subjects (repeated measures), and mixed designs — with covariates, cluster structures (random intercepts & slopes), and arbitrary sample sizes.

Supported likelihoods: Gaussian, Student-t, Log-Normal, Gamma, Bernoulli, Beta, Binomial, Poisson, Negative Binomial. Full faux and glmmTMB R code export.

Power analysis: Commented simulation-based power block (glmmTMB + car::Anova, Option B: LRT) directly in the generated R code — ready to run in R.
Small Worlds built → start the Bayesian workflow
IV — Bayesian Model Workflow
Workflow

Build models

Five tools cover the complete Bayesian workflow — from prior specification through code generation to model checking, posterior validation, and model comparison after fitting. Causal DAG structure and data generation: → Section III — Small Worlds.
DESIGN MODEL
SPECIFY PRIORS
GENERATE CODE
PRIOR CHECKS
↓ fit in R → Posterior PPC
📐
Kruschke McElreath Tutorial + Tool
Model Architect
Step ①: Build your model visually. Choose likelihood, predictors, and structure — the tool draws the Kruschke diagram in real time and displays McElreath notation. Priors appear as mini distribution curves in the diagram.

With guided walkthrough for beginners — from likelihood selection to a complete hierarchical model.
⚙️
brms R code Tool
brms Model Builder
Steps ② + ③: The complete brms code generator. Configure predictors, set priors (with live slider and distribution curves), set sampling parameters — and copy the ready-to-use R code. Supports distributional models and multilevel structures.

Built-in PPC export: The generated code includes a commented-out block for saving posterior_predict() draws — ready to import into the Posterior Predictive Check app.
🔍
Prior Predictive Diagnostics Tool
Prior Predictive Check
Step ④: Before the data flows — simulate what your model predicts a priori. Sensible priors generate realistic predictions. The tool imports the prior configuration directly from the brms Model Builder and visualizes prior predictive distributions.
after fitting in R ↓ Posterior PPC
after PPC → compare models
📊
Shiny · Live real model bayesplot
Posterior Predictive Check
Step ⑤: After fitting in R — upload your brms model and check whether it reproduces the data well. Guided tutorial through KDE overlay, summary statistics, error structure, and prediction intervals with automatic evaluation.

Requires: a saved brms object (saveRDS(fit, "model.rds")). Runs as a Shiny app — no local R needed.
🔭
LOO-CV elpd · PSIS Pareto-k loo_compare()
LOO Lab
Step ⑥: After PPC — compare your models. Paste loo_compare() output directly from R and get an annotated forest plot, Pareto-k diagnostics, and a traffic-light decision rule.

Concept first: animated LOO walkthrough shows how elpd is built from held-out predictions — no R needed for Stage 1.
Posterior in hand → now make a decision
V — Posterior Decision
Decision

From posterior to decision

HDI, ETI, and ROPE — turning a posterior into a principled statement. First explore concepts interactively (Decision Lab), then apply to your own posterior draws (Decision Maker).
☽ Golem Builder → causal effect
HDI · ETI · ROPE · Decision
⚗️
G-Computation ATE · ATT · ATU brms
Causal Calculator
A worked example of causal effect estimation via G-Computation (standardization): make confounding visible, correct naive bias, compare ATE / ATT / ATU, visualize counterfactuals.

Recommended preparation: Use the Golem Builder to identify the correct adjustment set for your own research question — the Causal Calculator then shows how to implement exactly that analysis in brms.
⚖️
Interactive HDI · ETI · ROPE bayestestR
Decision Lab
What is an HDI — and how does it differ from the equal-tailed interval? Where does the effect lie, and does it fall within the region of practical equivalence (ROPE)?

Three decision logics in parallel: trichotomous traffic-light, full-ROPE proportion, and ETI comparison. Normal, t, and Gamma posteriors. Includes bayestestR code.
🔬
CSV upload real draws bayestestR
Decision Maker
Load your own posterior draws from brms, Stan, or rstanarm — define transformations and derived quantities (Cohen's d, Odds Ratios) directly as formulas. HDI, ETI, and ROPE on real data. APA export for publications.
Which tool for which audience?
Undergraduate
→ Bayesian Thinking Simulator
→ Bayes interactive
→ Prior Lab (CI-Solver)
→ GLM Conditional Distributions
→ GLM 3D Visualization
→ Model Architect (guided)
Graduate / MSc
→ GLMM interactive
→ Prior Lab (GLM Mode)
→ Model Architect (complete)
→ brms Model Builder
→ Prior Predictive Check
→ Decision Lab (HDI/ETI/ROPE)
Research & Applied
→ brms Model Builder (distributional)
→ Posterior PPC (Shiny)
→ LOO Lab (model comparison)
→ Golem Builder + Causal Calculator
→ Decision Maker (APA export)
→ Full workflow ①→⑦
Scientific Foundations & Acknowledgments
This lab is inspired by and built upon the pedagogical and methodological approaches of the following researchers.
JKK
John K. Kruschke
The visual model diagrams and the HDI/ROPE decision logic are based on his work Doing Bayesian Data Analysis.
doingbayesiandataanalysis.blogspot.com ↗
RM
Richard McElreath
Model architecture, causal inference with DAGs, and the Bayesian workflow follow his approach in Statistical Rethinking.
github.com/rmcelreath ↗
ASK
A. Solomon Kurz
His comprehensive translations of the standard works into brms and tidyverse syntax are an invaluable resource for applied Bayesian modeling.
solomonkurz.netlify.app ↗
PCB
Paul-Christian Bürkner
All code outputs from this lab target compatibility with brms, the R package for Bayesian regression modeling developed by him.
paul-buerkner.github.io/brms ↗
Help