Interactive demos
Browser-side · no install · play freely
Interactive demos
Move the sliders. Each demo simulates fresh data on every reload, runs the estimator client-side in Observable JS, and shows what changes when assumptions change.
What’s here
A Parallel-trends visualizer
Two groups under a common linear trend, with optional pre-treatment slope differential and a true ATT. Watch the TWFE bias appear as you violate parallel trends.
B RDD bandwidth picker
Sharp RDD on a simulated NMTC-style poverty-rate threshold. Slide the bandwidth and watch the local-linear estimate, the 95% CI, and the bias (vs. the true effect) react in real time.
C Cluster-RCT power calculator
Two-arm cluster-randomized design. Adjust sample size, cluster size, ICC, target power, and σ. Get the design effect, effective sample, and minimum detectable effect with a live power curve.
What’s coming
A few more demos are queued. Each links to its source chapter once it lands.
- Synthetic Control donor weights (Ch. 7): pick a treated unit, optimize over a donor pool, see the synthetic recipe.
- Quantile-regression coefficient plot (Ch. 8): slide τ and watch the coefficient curve change.
- TWFE forbidden comparisons (Ch. 4): staggered rollout simulator showing Goodman-Bacon decomposition weights.
- Causal-forest CATE explorer (Ch. 9): synthetic heterogeneous treatment effects on a 2-D covariate grid.
- Effective-distance shortest-path (Ch. 15): toggle a chokepoint (Suez, Panama, Hormuz) and see how bilateral effective distance reshapes.
How they’re built
Every demo is an Observable JS chunk inside the Quarto chapter. No server. The simulation runs in your browser every time you move a slider. The estimator code is small and easy to read; the data are simulated from clear DGPs so you can see what each assumption is doing.
If you want to copy a demo into your own teaching site, the source for any chapter is one click away via the “edit” link in the right margin. The full repo is at github.com/ihelfrich/inference-lab.