Tutorials › Propensity Score Matching and Instrumental Variables › Optimal Matching With Calipers

Matching Methods · Tutorial 176 of 699

Optimal Matching With Calipers

You will learn to combine a caliper eligibility rule with minimum-total-distance pair assignment, including how to handle infeasible pairs and unmatched units.

Intermediate 9 min read

What You'll Learn

  • Define eligible treated-control pairs using a caliper threshold.
  • Distinguish the distance used for eligibility from the cost minimized in the assignment.
  • Formulate optimal pair matching over feasible edges.
  • Solve assignments with infeasible pairs and possible unmatched units.
  • Diagnose whether a caliper makes the desired matching size infeasible.
  • Compare caliper-constrained optimal matching with nearest-neighbor and unconstrained optimal matching.

Why Combine Calipers With Optimal Assignment?

A caliper rules out treated-control pairs that are too far apart on a specified scale. Optimal pair matching then chooses among the pairs that remain, minimizing their total matching cost while respecting the one-to-one assignment constraint. The combination addresses two different design goals: prevent unacceptable individual matches, and avoid a collection of eligible matches whose overall cost is unnecessarily high.

The distinction matters because a caliper does not itself say which eligible pairs should be selected. Nor does minimizing total distance by itself ensure that every selected pair is close enough. A valid solution must satisfy both requirements.

Definition: Let \(T\) be the set of treated units and \(C\) the set of control units. For treated unit \(i\) and control unit \(j\), let \(d_{ij}\) be the distance used to measure their matching cost. Let \(g_{ij}\) be the quantity used to apply the caliper, and let \(\gamma\) be its width. The pair \((i,j)\) is eligible if \(g_{ij}\leq\gamma\); otherwise it is infeasible and cannot be selected. A caliper-constrained optimal pair assignment minimizes the sum of \(d_{ij}\) over selected pairs, subject to eligibility and one-to-one matching constraints.

Often the caliper and the assignment cost use the same distance: for example, \(g_{ij}=d_{ij}\). They need not. A design may use an absolute propensity-score difference for eligibility but a covariate distance for the assignment objective. These choices should be stated explicitly, including the scale and units of the caliper quantity. When applying a threshold, the convention here is inclusive: a pair exactly at the threshold is eligible.

Formulating the Assignment

Represent a candidate assignment by binary variables \(x_{ij}\), where \(x_{ij}=1\) means treated unit \(i\) is matched to control unit \(j\), and \(x_{ij}=0\) otherwise. Let \(E\) be the set of eligible pairs. No ineligible pair can receive a positive assignment. With no control reuse, each treated unit and each control unit appears in at most one selected pair.

$$ \begin{aligned} &\text{Minimize} && \sum_{(i,j)\in E} d_{ij}x_{ij}\\ &\text{subject to} && \sum_{j:(i,j)\in E}x_{ij}\leq 1 \quad \text{for each }i\in T,\\ &&& \sum_{i:(i,j)\in E}x_{ij}\leq 1 \quad \text{for each }j\in C,\\ &&& x_{ij}\in\{0,1\}\quad \text{for each }(i,j)\in E. \end{aligned} $$

This objective alone does not determine how many pairs to form: selecting no pairs would give a total cost of zero. In practice, the design specifies a target number of pairs \(K\), or uses the lexicographic rule below: first maximize the number of eligible pairs, then minimize total distance among assignments with that maximum size. If all treated units must be matched, the assignment must instead satisfy \(\sum_j x_{ij}=1\) for every treated unit, and the constraints may have no solution.

Key rule: Unless the design specifies a feasible fixed number \(K\), use a two-stage objective: maximize \(\sum_{(i,j)\in E}x_{ij}\), then minimize \(\sum_{(i,j)\in E}d_{ij}x_{ij}\) among assignments attaining that maximum. This prevents a low-cost but needlessly small assignment from being called optimal.

Why the Restricted Optimum Is the Right Comparison

The justification is direct. The caliper removes every assignment containing an ineligible pair, so the set of assignments allowed by the caliper is a subset of all one-to-one assignments. Among the allowed assignments of a specified size \(K\), the optimal solution is the one with the smallest sum of selected costs. If there are finitely many units, there are finitely many such assignments; provided at least one assignment of size \(K\) is feasible, a minimum exists. It is a global minimum over the allowed assignments, not merely a sequence of locally nearest choices.

If no assignment of size \(K\) exists, the objective cannot fix that problem: the requested design is infeasible under the caliper. The researcher must revise the target size, the caliper or the design, and report the resulting change. Increasing the caliper may add eligible pairs, but it does not guarantee that every treated unit can be matched if there are too few controls.

Worked Example: Choosing the Lowest-Cost Feasible Perfect Assignment

Suppose three treated units, A, B, and C, are to be paired with three controls, 1, 2, and 3. The distance is also the caliper quantity, and the caliper width is \(\gamma=4\). The hypothetical distances are:

Control 1Control 2Control 3
Treated A148
Treated B253
Treated C624

Check eligibility. A pair is eligible when its distance is at most 4. Thus A can match to 1 or 2; B can match to 1 or 3; and C can match to 2 or 3. The other three pairs are infeasible.

Find the feasible perfect assignments. If A is assigned to 1, then B must take 3 and C must take 2, for a total distance of \(1+3+2=6\). The other feasible perfect assignment is A to 2, B to 1, and C to 3, with total distance \(4+2+4=10\). Each assignment uses every treated unit and every control once.

The minimum is 6, so the optimal caliper-constrained assignment is A–1, B–3, C–2. The alternative has total distance \(10\), which is 4 distance units greater. A globally optimal assignment is not obtained by independently selecting each unit’s closest control; it is chosen subject to the shared one-to-one constraints.

When Some Units Must Remain Unmatched

A caliper can make a requested number of pairs impossible even when individual units each have at least one eligible partner. For example, several treated units may all have eligible edges only to the same single control. The assignment constraint allows that control to be used only once. Feasibility therefore depends on the pattern of eligible pairs, not just on whether each unit has a neighbor.

Worked Example: Maximum Cardinality With an Unmatched Treated Unit

Consider treated units A, B, and C and controls 1 and 2. The hypothetical distances are \(d_{A1}=1\), \(d_{A2}=5\), \(d_{B1}=2\), \(d_{B2}=2\), \(d_{C1}=4\), and \(d_{C2}=1\). Use the same distance for the caliper, with \(\gamma=3\).

The eligible pairs are A–1, B–1, B–2, and C–2. A cannot use control 2, and C cannot use control 1. Since there are only two controls, at most two pairs can be formed. Two pairs are feasible, so the maximum cardinality is 2.

Compare the possible two-pair assignments. A–1 with B–2 has total distance \(1+2=3\). A–1 with C–2 has total distance \(1+1=2\). B–1 with C–2 has total distance \(2+1=3\). Therefore the minimum-cost maximum-cardinality assignment is A–1 and C–2, with B unmatched. The result follows from the stated priority: first form as many eligible pairs as possible, then minimize their total distance.

This assignment does not establish that B is unimportant or that its outcomes can be ignored without consequence. It records a design limitation: under this caliper and one-to-one constraint, B is not included in the selected pairs. The number and characteristics of unmatched units should be reported.

Eligibility and Cost Can Use Different Quantities

The caliper is an eligibility rule, not necessarily the objective function. For instance, a design can restrict propensity-score differences to a chosen width and then minimize a covariate distance among the eligible assignments. This lets the caliper enforce a closeness requirement on one scale while the objective selects an assignment using another scale. It also means that an assignment with the smallest propensity-score distance need not minimize the chosen covariate cost.

Worked Example: A Propensity-Score Caliper With a Separate Cost

Suppose the propensity scores for treated units T1 and T2 are 0.40 and 0.50, and those for controls C1 and C2 are 0.43 and 0.46. Eligibility is based on absolute propensity-score difference, with \(\gamma=0.06\). The separate assignment costs are hypothetical covariate distances:

Control C1Control C2
Treated T172
Treated T216

For T1, the score differences are \(|0.40-0.43|=0.03\) and \(|0.40-0.46|=0.06\); both pairs are eligible. For T2, they are \(|0.50-0.43|=0.07\) and \(|0.50-0.46|=0.04\); only T2–C2 is eligible. Thus the only assignment matching both treated units is T1–C1 and T2–C2, with total cost \(7+6=13\).

If the caliper is widened to \(\gamma=0.08\), all four pairs are eligible. The two perfect assignments then have costs \(7+6=13\) for T1–C1 and T2–C2, and \(2+1=3\) for T1–C2 and T2–C1. The latter assignment is now optimal. Widening the caliper has added an assignment that was previously forbidden; the cost objective then selects it. The caliper has been checked on propensity-score differences, while the minimized total uses the distinct covariate-distance costs shown in the table.

Diagnostics, Alternatives, and Limitations

Before interpreting an assignment, inspect the eligible-pair structure. List the treated and control units with no eligible partners, count eligible partners for each unit, and determine whether the requested number of pairs can actually be formed. For a perfect assignment of every treated unit, a stronger feasibility check is needed than simply confirming that each treated unit has at least one eligible control: every subset of treated units must collectively have at least as many eligible controls as treated units in that subset. A failure indicates that the requested full treated-unit assignment is impossible.

After matching, verify that every selected pair satisfies the caliper and that no unit is reused. Recalculate the stated total cost from the selected pairs. Also assess covariate balance and overlap in the matched sample; a low assignment cost does not by itself prove adequate balance, remove unmeasured confounding, or guarantee a valid causal estimate. Report the caliper scale and width, the objective distance, the number of eligible pairs formed, units left unmatched, and any relevant balance diagnostics.

Nearest-neighbor matching within calipers chooses a close eligible partner at each step, but a local choice can affect later options. Caliper-constrained optimal pair matching instead minimizes the total cost over the allowed assignment as a whole. Unconstrained optimal pair matching may achieve a smaller total cost by using pairs that violate the caliper, so its solution is not a substitute when that restriction is a design requirement. If the caliper eliminates too many pairs, changing it may improve matchability but also relax the closeness rule. Variable-ratio matching is another possible design when one-to-one pairing is unsuitable; its assignment structure differs from the one-to-one formulation here.

Common pitfall: “The optimal assignment has the smallest total distance, so every pair must be close enough.” This is false unless eligibility was enforced in the optimization. The correction is to remove infeasible pairs from the assignment problem first, then minimize total cost over the remaining assignments. Also specify how match count is handled; otherwise an unconstrained minimum-cost objective can select no pairs at all.

Check Your Understanding

Use the definitions and the lexicographic rule in these questions. Each solution is included below.

  1. With caliper width 0.10, is a pair whose eligibility quantity is 0.10 allowed under the convention used here?
  2. There are two treated units and one control, and both treated units have an eligible edge to that control. Can both treated units be matched in one-to-one matching? What is the maximum number of pairs?
  3. A design uses a propensity-score difference for eligibility and a covariate distance as the assignment cost. Which quantity determines whether a pair can be selected, and which quantity is minimized?
  4. Why is minimizing total distance without specifying match count not a sufficient assignment objective?

Solutions. (1) Yes. Eligibility is defined by \(g_{ij}\leq\gamma\), so equality at 0.10 passes. (2) No. The control can be used at most once, so only one pair can be formed; the maximum cardinality is 1. (3) The propensity-score difference determines eligibility through the caliper; the sum of selected covariate distances is minimized among eligible assignments of the specified size, or among maximum-cardinality assignments under the lexicographic rule. (4) Since every selected cost is nonnegative in the usual distance setting, choosing no pairs can yield a total of zero. The design must fix the number of pairs or maximize match count before minimizing total distance.

Clinical Biostats