Tutorials › Econometrics (Graduate) › Matching With Replacement and Tied Matches

Matching and Weighting Methods · Tutorial 635 of 952

Matching With Replacement and Tied Matches

Learn how replacement and tie rules determine matched comparisons, and how to calculate an ATT using each control’s total matching weight.

Advanced 10 min read

What You'll Learn

  • Distinguish matching with replacement from one-to-one matching without replacement.
  • Define equal-weight handling of tied nearest neighbors.
  • Calculate treated-unit matched contrasts and their average.
  • Aggregate repeated control matches into weights for the ATT estimate.
  • Explain how matching choices affect the comparison and its causal interpretation.

Why Replacement and Ties Matter

Nearest-neighbor matching pairs each treated unit with one or more control units that are close on the chosen covariates or score. Two practical choices affect the resulting estimate: whether a control can be used for more than one treated unit, and what to do when several controls are equally near. These choices change which observed control outcomes stand in for treated units’ unobserved control outcomes, so they can change the estimated treatment effect.

The focus here is the average treatment effect for the treated (ATT). Matching is a way to construct a comparison for treated units; it does not, by itself, make the comparison causal. The causal interpretation relies on assumptions such as consistency, no interference between units, conditional independence of treatment and potential outcomes given the matching covariates, and adequate availability of comparable controls. The matching procedure must also use information that is appropriate for defining comparability, such as pretreatment covariates or an estimated propensity score.

Definition: Let \(D_i=1\) indicate that unit \(i\) is treated and \(D_i=0\) indicate control status. Let \(Y_i(1)\) and \(Y_i(0)\) be that unit’s potential outcomes under treatment and control. The ATT is \(E[Y_i(1)-Y_i(0)\mid D_i=1]\). Matching estimates it by averaging, over treated units, the difference between each observed treated outcome and a matched estimate of that unit’s untreated outcome.

For a treated unit \(i\), write \(M(i)\) for its selected set of matched controls, and let \(w_{ij}\) be the weight assigned to control \(j\) in that match. The weights for each treated unit sum to one. If there is one match, its weight is one; if \(k_i\) equally near controls are all retained, each receives weight \(1/k_i\). The matched estimate of the untreated outcome for treated unit \(i\) is the weighted average of control outcomes in \(M(i)\).

$$ \widehat{Y_i(0)}=\sum_{j:D_j=0} w_{ij}Y_j,\qquad \widehat{\tau}_{ATT}=\frac{1}{n_1}\sum_{i:D_i=1}\left(Y_i-\widehat{Y_i(0)}\right), $$

Here \(n_1\) is the number of treated units, and weights not assigned to a control are zero. Each treated unit contributes one matched contrast to the average, even if that unit has several matched controls.

Matching With and Without Replacement

With replacement, a control unit may be selected for multiple treated units. Each treated unit’s match can therefore be chosen separately from the available controls. This can give each treated unit a close match, but some controls may be used repeatedly while others are never used.

Without replacement, each control unit can be used at most once. The matches are then linked: assigning a control to one treated unit removes it from the choices for the others. The final pairs may depend on the order in which treated units are matched or on the assignment rule used to select the pairs. Without-replacement matching therefore cannot generally be described as independently choosing the nearest available control for every treated unit.

FeatureWith replacementWithout replacement
Control reuseA control may match several treated unitsEach control is used at most once
Choice for each treated unitCan be made separately from the full control poolDepends on controls already assigned
Common consequenceSome controls receive substantial total weightLater matches may be less close

Worked Example: A Control Reused for Two Treated Units

Suppose three treated units have outcomes \(12\), \(10\), and \(15\). Two controls have outcomes \(8\) and \(11\). Based on the matching distance, the first and second treated units each select the control with outcome \(8\), while the third selects the control with outcome \(11\). Assume one nearest control per treated unit and matching with replacement.

The matched contrasts are \(12-8=4\), \(10-8=2\), and \(15-11=4\). Thus

$$ \widehat{\tau}_{ATT} =\frac{(12-8)+(10-8)+(15-11)}{3} =\frac{4+2+4}{3} =\frac{10}{3} \approx 3.333. $$

The estimate is \(3.333\) outcome units. The control with outcome \(8\) contributes to two treated units’ comparisons, not just one. Equivalently, the matched control mean over the three treated units is \((8+8+11)/3=9\), while the treated mean is \((12+10+15)/3=12.333\); their difference is again \(12.333-9=3.333\). This is an estimate for the treated units represented in this example, not proof that treatment caused the difference.

Accounting for Reused Controls

When a control is used repeatedly, its outcome should enter the ATT estimate once for each treated unit to which it contributes, with the corresponding matching weight. A convenient summary is the control’s aggregate matching weight: add its weights across all treated units. This makes the reuse explicit without changing the estimator.

$$ W_j=\sum_{i:D_i=1}w_{ij},\qquad \widehat{\tau}_{ATT} =\frac{1}{n_1}\sum_{i:D_i=1}Y_i -\frac{1}{n_1}\sum_{j:D_j=0}W_jY_j. $$

The second expression follows by rearranging the finite sums in the treated-unit estimator. Because each treated unit’s weights sum to one, the aggregate control weights sum to \(n_1\), not necessarily to the number of distinct controls used. Dividing their weighted outcome total by \(n_1\) gives the matched control mean on the treated-unit scale.

Key takeaway: Reuse does not mean that a control should be counted only once in the ATT calculation. It means that the control’s outcome receives the sum of the matching weights assigned to it across treated units.

Worked Example: Aggregating Matching Weights

Continue the previous example. The control with outcome \(8\) is matched once to each of the first two treated units, and the control with outcome \(11\) is matched to the third. Each match has weight one. Therefore, the aggregate weights are \(W_1=2\) for the first control and \(W_2=1\) for the second.

The treated mean is \((12+10+15)/3=12.333\). The weighted matched-control mean is

$$ \frac{W_1(8)+W_2(11)}{n_1} =\frac{2(8)+1(11)}{3} =\frac{27}{3}=9. $$

Subtracting gives \(12.333-9=3.333\), the same estimate as averaging the three individual contrasts. Notice that the two distinct controls have aggregate weights summing to \(2+1=3=n_1\). Treating the two controls as equally weighted would instead give \((8+11)/2=9.5\), which is not the matched control mean for these treated units and would produce the wrong estimate.

Handling Tied Nearest Neighbors

A tie occurs when two or more eligible controls have the same minimum matching distance from a treated unit. A clear and symmetric rule is to retain all controls tied at the minimum distance and give them equal weights. If \(k_i\) controls tie for treated unit \(i\), each receives weight \(1/k_i\). This makes the matched outcome their arithmetic mean.

A different rule is to select just one tied control using a prespecified tie-breaker, such as a fixed ordering of control identifiers. Either rule can define an estimator, but the chosen rule should be stated and applied consistently. Choosing a tied control after examining its outcome is outcome-dependent selection and can distort the comparison. If ties are retained equally, the estimator uses fractional matching weights; a treated unit still contributes one contrast, not \(k_i\) separate treated observations.

Worked Example: Equal Weights for a Tie

Suppose two treated units have outcomes \(10\) and \(14\). The first treated unit has two equally near controls with outcomes \(6\) and \(8\), while the second has one nearest control with outcome \(8\). Use all tied nearest controls with equal weights for the first treated unit, and use weight one for the second.

For the first treated unit, the matched control outcome is \((6+8)/2=7\), so its contrast is \(10-7=3\). For the second, the matched control outcome is \(8\), so its contrast is \(14-8=6\). The estimate is

$$ \widehat{\tau}_{ATT} =\frac{(10-7)+(14-8)}{2} =\frac{3+6}{2}=4.5. $$

To verify the aggregate-weight calculation, the control with outcome \(6\) receives weight \(1/2\). The control with outcome \(8\) receives weight \(1/2\) from the first treated unit and weight \(1\) from the second, for total weight \(3/2\). Thus the matched control mean is \(\{(1/2)(6)+(3/2)(8)\}/2=(3+12)/2=7.5\). The treated mean is \((10+14)/2=12\), and \(12-7.5=4.5\).

Why the Matching Rule Changes the Estimate

Replacement, tie handling, and the distance rule determine the weights \(w_{ij}\), so they can affect the estimated ATT. With replacement, repeatedly used controls can carry large aggregate weights. Without replacement, avoiding reuse can force some treated units to take more distant controls. When several controls tie, retaining all of them averages their outcomes; selecting one gives that selected outcome full weight for the treated unit. These are substantive features of the estimator, not merely bookkeeping details.

The matching rule also determines which treated units are represented and which controls supply their comparisons. Thus the estimate should be reported with its target population and matching rule in view. Matching cannot repair a lack of relevant covariate information or make incomparable units comparable simply by assigning them to pairs. The conditional independence and support assumptions remain essential to a causal interpretation.

The algebra behind aggregate weights is short but useful. Substitute the matched outcome definition into the ATT formula, then reorder the sums by control unit:

$$ \begin{aligned} \widehat{\tau}_{ATT} &=\frac{1}{n_1}\sum_{i:D_i=1} \left(Y_i-\sum_{j:D_j=0}w_{ij}Y_j\right)\\ &=\frac{1}{n_1}\sum_{i:D_i=1}Y_i -\frac{1}{n_1}\sum_{j:D_j=0} \left(\sum_{i:D_i=1}w_{ij}\right)Y_j\\ &=\frac{1}{n_1}\sum_{i:D_i=1}Y_i -\frac{1}{n_1}\sum_{j:D_j=0}W_jY_j. \end{aligned} $$

This identity shows precisely why repeated controls must retain their accumulated weights. It also applies when a treated unit has tied neighbors with fractional weights, provided each treated unit’s weights sum to one.

Common Mistakes

  • Counting each distinct control only once. This ignores how often the control was matched and generally changes the estimator. Use the sum of its matching weights.
  • Counting tied controls as additional treated units. Tied controls contribute to one treated unit’s weighted matched outcome; they do not increase \(n_1\).
  • Assuming no replacement always improves matching. Restricting reuse may require a treated unit to use a less similar control. Compare the resulting matches rather than assuming one rule is automatically superior.
  • Describing the estimate as causal without assumptions. Matching constructs comparisons; a causal interpretation additionally requires the relevant identification assumptions and suitable covariate information.
Key takeaway: Define the replacement and tie rules before calculating. Give each treated unit a matched control-outcome estimate whose weights sum to one, average the resulting treated-unit contrasts, and aggregate control weights when a control is reused.

Check Your Understanding

Answer each question using the matching rules and formulas from this tutorial.

  1. In one sentence, distinguish matching with replacement from matching without replacement.
  2. A control is matched to four treated units, once for each, with weight one. What is its aggregate matching weight, and how does it enter the matched control mean?
  3. A treated unit has three equally near controls with outcomes \(4\), \(7\), and \(10\). Under equal-weight tie handling, what matched control outcome is assigned to that treated unit?
  4. Why must the weights for a treated unit sum to one when its matched control outcome is calculated?
  5. Explain why counting each distinct reused control only once can produce an incorrect ATT estimate.
Clinical Biostats