Matching Estimators: Nearest Neighbor and Kernel Methods

Graduate Depth 86 in the knowledge graph I know this Set as goal
Unlocks 1 downstream topic
causal-inference matching nonparametric

Core Idea

Matching estimators (nearest neighbor, kernel, local polynomial) estimate treatment effects nonparametrically by comparing outcomes between treated and control units with similar covariates. These methods avoid functional form assumptions but require sufficient overlap in covariate distributions and careful choice of bandwidth or neighborhood size.

Explainer

From your prerequisite work on propensity score matching and treatment effect estimation, you know the fundamental causal inference problem: we observe each person in either the treated or control state, never both. The counterfactual — what a treated person's outcome would have been without treatment — must be constructed by finding appropriate comparisons in the control group. Propensity score matching compressed all the covariates into a single number (the predicted probability of treatment) and matched on that scalar. Matching estimators take a more direct approach: compare treated units to control units that look similar on the covariates themselves, without the intermediate step of modelling selection into treatment.

Nearest neighbor matching is the most intuitive version. For each treated unit, find the control unit (or k nearest control units) with the most similar covariate vector — "nearest" in some distance metric, typically Euclidean distance in covariate space or the Mahalanobis distance which accounts for correlations among covariates. The estimated treatment effect for that unit is the difference between its observed outcome and the average outcome of its matched controls. Aggregate across all treated units to get the Average Treatment Effect on the Treated (ATT). The approach is nonparametric: you never specify how the outcome relates to the covariates. The estimate is driven purely by the comparison of similar units.

Kernel matching generalizes this by giving every control unit a weight when constructing the counterfactual for a treated unit, with weights declining as covariate distance grows. Rather than a sharp cutoff (take the k nearest neighbors), kernel matching uses a smooth weighting function. The bandwidth controls how quickly the weights decay: small bandwidth means only very close controls matter (low bias, high variance); large bandwidth averages over more controls (low variance, higher bias if distant controls are genuinely different). Local polynomial matching is a further refinement that fits a local regression surface to the control units' outcomes rather than simply averaging them, improving bias when covariates have real predictive power.

All matching estimators rest on the conditional independence assumption (CIA): conditional on observed covariates, treatment assignment is as good as random. This is the same identifying assumption as propensity score matching — both require that you have measured all the variables that jointly determine selection and outcomes. Where matching methods add value is in robustness to misspecification: if you are wrong about the functional form linking covariates to outcomes, a parametric regression will be biased even if CIA holds, but a nonparametric matching estimator adjusts without needing the form specified. The cost is the overlap requirement — matching only works where there are control units comparable to treated units. If high-covariate-value treated units have no near-control counterparts (a failure of common support), estimates in those regions are unreliable or extrapolated, and the comparison between matching and regression estimates is itself a useful robustness diagnostic.

Practice Questions 5 questions

Prerequisite Chain

Counting to 10Counting to 20Understanding ZeroThe Number ZeroCounting to FiveOne-to-One CorrespondenceCombining Small Groups Within 5Addition Within 10Addition Within 20Two-Digit Addition Without RegroupingTwo-Digit Addition with RegroupingAddition Within 100Repeated Addition as MultiplicationMultiplication Facts Within 100Division as Equal SharingDivision as Grouping (Measurement Division)Division: Grouping (Repeated Subtraction) ModelDivision: Fair Sharing ModelDivision as Equal SharingDivision as GroupingBasic Division FactsDivision Facts Within 100Two-Digit by One-Digit DivisionDivision with RemaindersRemainders and Quotients in DivisionDivision Word ProblemsIntroduction to Long DivisionFactors and MultiplesPrime and Composite NumbersEquivalent FractionsRelating Fractions and DecimalsDecimal Place ValueReading and Writing DecimalsComparing and Ordering DecimalsAdding and Subtracting DecimalsMultiplying DecimalsDividing DecimalsDividing FractionsMixed Number ArithmeticOrder of OperationsInteger Order of OperationsVariable ExpressionsCombining Like TermsOne-Step EquationsTwo-Step EquationsSolving Multi-Step EquationsEquations with Variables on Both SidesAngle Pairs: Complementary, Supplementary, and VerticalParallel Lines and TransversalsCorresponding AnglesAlternate Interior AnglesTriangle Angle Sum TheoremExterior Angle TheoremTriangle Inequality TheoremSimilar Triangles: AA SimilaritySimilar Triangles: SSS and SAS SimilarityProportions in Similar TrianglesRight Triangle Trigonometry IntroductionTrigonometric Ratios ReviewRadian MeasureConverting Between Degrees and RadiansThe Unit CircleGraphing Sine and CosineGraphing Tangent and Reciprocal Trigonometric FunctionsDerivatives of Trigonometric FunctionsAntiderivativesIndefinite IntegralsBasic Integration RulesRiemann SumsDefinite Integral DefinitionProbability Density Functions and Continuous DistributionsCumulative Distribution FunctionsContinuous Random VariablesNormal DistributionCentral Limit TheoremConfidence Intervals for MeansZ-Tests and T-Tests for MeansOne-Sample Z-Test for MeansOne-Sample and Two-Sample T-TestsOne-Way ANOVAF-Test and Joint SignificanceR-Squared and Model FitOmitted Variable BiasCausal Inference and the Identification ProblemPotential Outcomes and the Rubin Causal ModelTreatment Effects: ATE, CATE, and Heterogeneous EffectsMatching Estimators: Nearest Neighbor and Kernel Methods

Longest path: 87 steps · 486 total prerequisite topics

Prerequisites (2)

Leads To (1)