Nearest-Neighbour Propensity Score Matching

hard
Unit 23 · Causal Inference0/0 to milestone

To estimate the effect of a treatment on the treated (ATT) from observational data, match each treated unit to the control unit with the closest propensity score (with replacement; ties to the lower index), then average the outcome differences.

Pro problem

Unlock this and every premium problem across all tracks — plus hidden-test grading, advanced AI engineering modules and new content every week.

Start 7-day free trial
solution.py · Python 3.13
Run your code to see results. ⌘↵ to run · ⌘⇧↵ to submit
Nearest-Neighbour Propensity Score Matching · TechGradify