Home▸Data Science▸Difference-in-Differences 2D: Policy Effect Estimator

Difference-in-Differences 2D: Policy Effect Estimator

Interactive 2D difference-in-differences simulator: watch treated and control group outcomes evolve before/after a policy on a live, pannable scatter plot, tune the true effect, noise and a parallel-trends violation, and see the DiD estimator's bias grow in real time.

Data Science2DAdvanced60 FPS📱 Mobile-adapted⇄ 3D version
2d-ds-topic-46 ↗ Open standalone

This simulator plots a live panel of individual observations for a treated and a control group across ten time periods, split by a policy introduced halfway through. Each point jitters gently around its group's true mean trend; the solid lines trace the two groups' actual outcome paths, and a dashed counterfactual line shows what the parallel-trends assumption predicts the treated group would have done without the policy. A dashed vertical marker shows exactly when the policy took effect. Sliders let you set the true causal effect, inject noise, resize the sample, and — most importantly — introduce a parallel-trends violation, watching the DiD estimator's bias grow away from the true effect in real time exactly as it would with a bad control group in a real policy study. Drag the plot to pan and scroll or pinch to zoom in on any stretch of the panel.

⚙ Under the hood

Interactive 2D difference-in-differences simulator: watch treated and control group outcomes evolve before/after a policy on a live, pannable scatter plot, tune the true effect, noise and a parallel-trends violation, and see the DiD estimator's bias grow in real time.

causal inferencedifference-in-differenceseconometricspolicy evaluationdata sciencestatistics

2D · HTML5 Canvas 2D · 60 FPS target · runs fully client-side, no install

What did you find?

Add reproduction steps (optional)