InteractiveWhole classPredict, observe, explainDecisionAccessibility not checkedPublished
Which scale finds the best matches? Genetic matching
By Alexis Diamond · Statistics · causal inference · Graduate · Computational / statistical · version 5
Licence: CC BY 4.0
Topicsgenetic matchingcovariate balancenearest neighbor matchingmahalanobis distanceobservational studies
Assumption ledger (9)
- dataA simulated sample of 40 treated and 150 controls from a seeded generator (sample 4 by default). Treated people are younger and less educated. It is not the Lalonde data.
- simplificationTwo confounders, age and education. Distance = √[(a·Δage)² + (e·Δeducation)²], each in years. This is GenMatch's diagonal weight matrix without the covariance (Cholesky) adjustment. Only the ratio e/a changes which control is nearest, so the curve and the search are over that ratio.
- simplificationOne-to-one nearest-neighbour matching with replacement, for the treated (ATT). A tie goes to the first control listed; GenMatch would keep all tied controls.
- parameterEach weight runs from ×0.01 to ×100 on a log scale. The curve of worst p-values is computed at 81 ratios from ×0.01 to ×100.
- simplificationBoth charts keep one fixed drawing scale (the same number of pixels per weighted year on both axes), so a slider stretches only its own axis; points stretched past the edge are off the chart.
- parameterBalance score as in GenMatch's default: the four p-values (paired t-test and KS test for each covariate) are sorted and compared smallest first; higher is better.
- distributionKS p-values use the asymptotic Kolmogorov formula. GenMatch's default uses a bootstrap KS test, which handles the ties that whole-number ages and school years create.
- parameterGenetic search: 10 candidate weights per generation, 10 generations, the best 3 kept each time. It starts from natural units plus random weights. GenMatch usually uses populations of hundreds or thousands, over many weights at once.
- interpretationBalance is judged on these two covariates only. Balance on observed covariates says nothing about unobserved confounders.
Checks Breakout ✓ · Accessibility ✓
Breakout check
✓ Ready for breakouts: every control we tried showed teammates the same thing.
Cite this · History
Cite this
Alexis Diamond (2026). Which scale finds the best matches? Genetic matching [Interactive model], version 5. Ideas at Play. https://ideasatplay.org/play/which-scale-finds-the-best-matches-genetic-matching-c74116?v=5 (CC BY 4.0)
History
- v5Removed the CS130 code box: live sessions now have a Freeze all rooms button for the host. (edited, Nov 2, 2026)current
- v4One step per screen: a step bar with six steps, each with its question above its own controls. Copy trimmed. (edited, Nov 2, 2026)View
- v3Part 2 has separate age and education sliders again. Both charts keep one fixed drawing scale, so each slider stretches only its own axis; points pushed past the edge are marked off the chart. (edited, Nov 2, 2026)View
- v2Part 1: no match line until asked; picking a control shows its distance; age weight slider added. Part 2: age and education only, one relative-weight slider, points move with the weight; search shown as a curve. Instructor freeze (CS130). (edited, Nov 2, 2026)View
- v1Imported; lineage before import is not available. (imported, Nov 2, 2026)View
Comments
No comments yet.
Sign in to comment or like.