Tutorials › Propensity Score Matching and Instrumental Variables › A Worked Full-Matching Problem With Ratio Limits

Matching Methods · Tutorial 189 of 699

A Worked Full-Matching Problem With Ratio Limits

Learn to construct and check full-matching sets that obey treated-to-control ratio limits while keeping the total within-set distance clear.

Intermediate 10 min read

What You'll Learn

  • Translate minimum and maximum treated-to-control ratios into inequalities for each matched set.
  • Check that a proposed allocation uses every unit once and gives each set at least one treated and one control unit.
  • Calculate a stated total-distance objective for a full match.
  • Compare valid and invalid allocations using a numerical distance table.
  • Diagnose ratio violations, infeasible allocations, and sensitivity to the chosen distance objective.

Turning Ratio Limits Into Matching Constraints

A full match partitions the treated and control units into matched sets. Every set must contain at least one treated unit and at least one control unit, and every included unit appears in exactly one set. Ratio limits add a local restriction: the number of treated units relative to the number of controls must fall within specified bounds in each set. The overall treated-to-control ratio across the entire sample does not establish that every set obeys those limits.

Definition: In a matched set \(j\), let \(t_j\) be the number of treated units and \(c_j\) the number of control units. A full match with minimum treated-to-control ratio \(L\) and maximum ratio \(U\) must satisfy $$ t_j \geq 1,\qquad c_j \geq 1,\qquad L \leq \frac{t_j}{c_j} \leq U $$ for every set \(j\). Equivalently, \(L c_j \leq t_j \leq U c_j\). The same treated-to-control convention is used for both limits.

For example, a minimum ratio of \(1:2\) and a maximum ratio of \(2:1\) mean \(1/2 \leq t_j/c_j \leq 2\). Thus, a set with one treated and two controls is permitted, as is a set with two treated and one control. With integer unit counts, the inequalities are applied to the actual counts; they are not rounded after calculating a ratio.

A distance table supplies the cost or dissimilarity between each treated-control pair. To make calculations precise, the examples below use the objective of summing every treated-control distance that falls within each set. If set \(j\) contains treated units \(i\) and controls \(k\), its cost is the sum of \(d_{ik}\) over all such cross-group pairs. The full-match cost is the sum of these set costs. This is a stated objective for these problems; matching software and formulations can define match cost differently, so the objective must be identified before comparing allocations.

The distances are treated as fixed and meaningful for the intended matching design. A feasible allocation must also respect any eligibility restrictions in the distance table, such as a prohibited pair shown as unavailable. Ratio feasibility alone does not guarantee good covariate balance or causal identification; those depend on the study design and the distances being used.

Worked Problems

Worked Example: Comparing Every Feasible Structure for Two Treated and Two Controls

Suppose the hypothetical distance table is:

C1C2
T116
T252

The ratio limits are \(1:2\) to \(2:1\), so each set must have \(1/2 \leq t_j/c_j \leq 2\). First consider two one-to-one sets: \(\{T1,C1\}\) and \(\{T2,C2\}\). Each has ratio \(1/1=1\), within the limits, and every unit is used once. Their total distance is

$$ 1+2=3. $$

The other pairing, \(\{T1,C2\}\) and \(\{T2,C1\}\), also meets the ratio limits, but its cost is \(6+5=11\). A single set containing all four units is feasible because its ratio is \(2/2=1\). Its cost includes all four cross-group distances:

$$ 1+6+5+2=14. $$

These are the possible full partitions here. If the two treated units are in the same set, both controls must be in that set too: leaving a control alone would violate the requirement that each set contain both groups. If the treated units are in different sets, each set must pair one treated unit with one control. Therefore, under the stated objective, the lower-cost pairing has total distance 3. The ratio limits permit both candidate structures; they do not themselves determine which one is preferable.

Worked Example: Building Two Sets at Opposite Ratio Limits

Consider three treated units and three controls with the following hypothetical distances. The minimum ratio is \(1:2\), and the maximum is \(2:1\).

C1C2C3
T1169
T2278
T3821

Use the sets \(\{T1,T2,C1\}\) and \(\{T3,C2,C3\}\). The first set has \(t_1=2\) and \(c_1=1\), giving \(t_1/c_1=2\), exactly the maximum. Its distance cost is \(d_{T1,C1}+d_{T2,C1}=1+2=3\). The second has \(t_2=1\) and \(c_2=2\), giving \(t_2/c_2=1/2\), exactly the minimum. Its cost is \(d_{T3,C2}+d_{T3,C3}=2+1=3\). Thus the full allocation has cost \(3+3=6\).

The allocation uses all six units once, each set contains both treatment groups, and both ratios satisfy their bounds. It is also optimal under the stated objective for this table. The only distances below 6 are \(T1\)-\(C1\), \(T2\)-\(C1\), \(T3\)-\(C2\), and \(T3\)-\(C3\). To include every unit using only those edges, \(T1\) and \(T2\) must share \(C1\), while \(T3\) must be grouped with \(C2\) and \(C3\). This yields the allocation shown and cost 6. Any alternative must use a distance of at least 6; the other units still require positive distances, so its total cost exceeds 6.

This example illustrates a useful check: limits are inclusive, so a set exactly at its minimum or maximum is valid. It also shows how a distance table and ratio constraints work together: the table identifies attractive links, while the limits restrict which units can be placed together.

Worked Example: Checking a Larger Allocation Against the Bounds

Suppose a hypothetical problem has four treated units and three controls, with ratios from \(1:2\) through \(2:1\). Consider the distance table and proposed sets below.

C1C2C3
T1198
T2279
T3814
T4932

Choose \(\{T1,T2,C1\}\) and \(\{T3,T4,C2,C3\}\). In the first set, \(t_1=2\), \(c_1=1\), and \(t_1/c_1=2\), within the limits. The cost is \(1+2=3\). In the second, \(t_2=2\), \(c_2=2\), and \(t_2/c_2=1\), also within the limits. Its cross-group cost is

$$ d_{T3,C2}+d_{T3,C3}+d_{T4,C2}+d_{T4,C3} =1+4+3+2=10. $$

The allocation therefore has total cost \(3+10=13\). It includes every treated unit and every control exactly once and both sets meet the ratio requirements.

A tempting alternative is \(\{T1,T2,T3,C1\}\) and \(\{T4,C2,C3\}\). The second set is permissible: its ratio is \(1/2\), and its cost is \(3+2=5\). But the first has three treated units and one control, so its ratio is \(3/1=3\), greater than the maximum of 2. Its cost, \(1+2+8=11\), does not make it an acceptable solution: a low or attractive distance cannot override a hard ratio constraint. The complete alternative is infeasible regardless of its total cost.

Why the Constraints Work and How to Check an Allocation

The ratio bounds can be checked without dividing. Multiplying \(L \leq t_j/c_j \leq U\) by \(c_j\) preserves the inequalities because \(c_j\) is positive, giving \(L c_j \leq t_j \leq U c_j\). For the limits \(L=1/2\) and \(U=2\), this becomes \(c_j/2 \leq t_j \leq 2c_j\). For instance, with three controls, the lower bound requires at least \(1.5\) treated units, so the integer count must be at least 2; the upper bound permits at most 6 treated units. This integer check avoids mistakenly rounding a ratio into compliance.

1
Read the ratio convention and limits.
Confirm that both bounds use treated divided by controls, and record the bounds as \(L\) and \(U\).
2
Propose sets using eligible pairs.
Every set must contain at least one treated unit and one control; do not assign a unit more than once.
3
Check each set's integer counts.
For every set, verify \(L c_j \leq t_j \leq U c_j\). A valid overall ratio does not compensate for a set that fails this check.
4
Calculate and compare costs.
Apply the stated distance objective consistently to all feasible allocations. Reject infeasible allocations before ranking them by cost.

For larger problems, a network-flow or integer-optimization formulation can enforce assignment and ratio restrictions while minimizing the chosen objective. The important practical point is that a solver's output should still be checked against the original unit counts, ratio limits, eligibility rules, and objective definition. Ties may produce multiple allocations with the same optimal cost; a tie-breaking rule is needed if a unique allocation is required.

Diagnostics, Alternatives, and Limitations

Several checks can reveal a problem before interpreting a matched analysis:

  • Check ratios set by set. Calculate \(t_j/c_j\), or check the equivalent inequalities, for every subclass. Do not check only the pooled treated-to-control ratio.
  • Check the partition. Confirm that no unit is omitted or reused and that every set contains both treatment groups. Reuse would change the allocation and its implied contribution to the objective.
  • Check the objective calculation. If the chosen rule sums all cross-group distances within a set, a set with two treated units and two controls contributes four distances, not two. Use the same rule for every candidate.
  • Check distance meaning and eligibility. A numerically small distance is useful only if the distance reflects the intended covariate similarity and the pair is allowed by design restrictions.

Pair matching is simpler to inspect because every set has one treated and one control, but it cannot represent larger subclasses. Full matching permits variable set sizes and can use all included units, while ratio limits constrain how large the treated or control side can be relative to the other. Caliper restrictions instead rule out pairs beyond a specified distance threshold; a ratio-feasible set can still contain an unacceptable pair if an applicable caliper is ignored. These design restrictions address different issues and may need to be imposed together.

Ratio limits do not guarantee covariate balance, adequate overlap, or unbiased treatment-effect estimation. A strict limit can also make a problem infeasible when the available eligible units cannot be partitioned into sets satisfying the bounds. Before relaxing a limit, identify which units or restrictions cause infeasibility and consider the consequences for the target population and design. Finally, the stated total-distance objective is not a universal measure of balance: different objective definitions can rank full matches differently. Report what was optimized, not merely that the match was “optimal.”

Common mistake: “There are four treated units and three controls overall, so a set with three treated and one control must be acceptable because the overall ratio is not extreme.” This reasoning confuses the pooled ratio with the set-level restriction. With a maximum ratio of \(2:1\), the proposed set has ratio \(3:1\) and is invalid. Check \(t_j/c_j\) separately for every set.

Check Your Understanding

Answer each question, then compare your reasoning with the solutions below.

  1. With ratio limits \(1:2\) to \(2:1\), is a set with three treated units and two controls valid? Explain.
  2. A proposed set has one treated unit and three controls. Does it satisfy those same limits?
  3. For ratio limits \(1:2\) to \(2:1\), a set contains four treated units and two controls. Verify its ratio and state whether it is valid.
  4. Why is it not enough to check that the pooled treated-to-control ratio falls within the specified limits?

Solutions. (1) Yes. Its ratio is \(3/2=1.5\), which lies between \(0.5\) and 2. (2) No. Its ratio is \(1/3\), below the minimum \(1/2\). (3) Yes. The ratio is \(4/2=2\), exactly the inclusive maximum. Equivalently, \(t=4 \leq 2c=4\), and \(t=4 \geq c/2=1\). (4) Limits apply to each matched set, not only to the allocation as a whole; a compliant pooled ratio can conceal a set that violates a bound.

Clinical Biostats