Summary
In multivariate matching, fine balance constrains the marginal distributions of a nominal variable in treated and matched control groups to be identical without constraining who is matched to whom. In this way, a fine balance constraint can balance a nominal variable with many levels while focusing efforts on other more important variables when pairing individuals to minimize the total covariate distance within pairs. Fine balance is not always possible; that is, it is a constraint on an optimization problem, but the constraint is not always feasible. We propose a new algorithm which returns a minimum distance finely balanced match when one is feasible, and otherwise minimizes the total distance among all matched samples that minimize the deviation from fine balance. Perhaps we can come very close to fine balance when fine balance is not attainable; moreover, in any event, because our algorithm is guaranteed to come as close as possible to fine balance, the investigator may perform one match and on that basis judge whether the best attainable balance is adequate or not. We also show how to incorporate an additional constraint. The algorithm is implemented in two similar ways, first as an optimal assignment problem with an augmented distance matrix, second as a minimum cost flow problem in a network. The case of knee surgery in the Obesity and Surgical Outcomes Study motivated the development of this algorithm and is used as an illustration. In that example, two of 47 hospitals had too few nonobese patients to permit fine balance for the nominal variable with 47 levels representing the hospital, but our new algorithm came very close to fine balance. Moreover, in that example, there was a shortage of nonobese diabetic patients, and incorporation of an additional constraint forced the match to include all of these nonobese diabetic patients, thereby coming as close as possible to balance for this important but recalcitrant covariate.
Keywords: Assignment algorithm, fine balance, matching, network optimization, observational study, optimal matching
1. Introduction
1.1 Motivating example: surgical outcomes in the severely obese
There are reasons to be concerned about surgical care for severely obese patients, those with a body mass index (BMI) of 35 or more. In part, their health problems may affect their surgical outcomes. In part, Medicare pays surgeons an essentially flat fee for performing a particular type of operation, but time and effort required from a surgeon in certain operations is affected by the sheer mass of the patient, the amount of cutting and repair required. This flat fee entails, in effect, a lower hourly rate of payment for operations on severely obese patients, with the possible consequence that market forces yield inferior care for the severely obese. Building upon the Surgical Outcomes Study (e.g., Silber, et al. 2001, 2005), the Obesity and Surgical Outcomes Study (OBSOS) is designed to compare severely obese (BMI ≥ 35) and non-obese (20 ≤ BMI < 30) surgical patients in Medicare with respect to survival, complications, length of stay in the hospital, readmission rates, surgical time which implicitly determines the surgeon’s hourly rate of compensation, and access to surgical care. The OBSOS study focuses on five types of surgery, thoracotomy, colectomy without cancer, colectomy with cancer, hip replacement without fracture, and knee replacement.
Forty seven hospitals, j = 1, 2, …, 47 = J, in Illinois, New York and Texas participated in OBSOS by performing chart abstractions for selected surgical patients. In addition, we had Medicare claims data, including mortality, for these hospitals and for all other hospitals in Illinois, New York and Texas. Because BMI is not in Medicare claims and had to be determined using chart abstraction, the Medicare claims data from all hospitals except the 47 participating hospitals was of limited use; however, an independent “risk score” was estimated from these hospitals. The “risk score” used a logit regression for the probability of death within thirty days of surgery from conditions such as prior heart attacks or a history of cancer. Because the risk score is estimated using outcomes, it must come from an independent sample. See Hansen (2008) for discussion of risk scores and, in particular, of estimating them from an independent sample.
The study design called for matching of severely obese patients to non-obese patients with ‘fine balance’ for J = 47 hospitals and control for various subsets of prognostic factors. For instance, diabetes is more common among the obese and may complicate surgery, but among many questions, one question is whether obesity matters apart from its relationship with diabetes. Among the clinical covariates were: (i) age, (ii) sex, (iii) diabetes, (iv) a modification of the acute physiology (Apache) score (Knaus et al. 1991), (v) a binary indicator of a missing Apache score, (vi) the risk-of-death score described above, and (vii) a propensity score estimating the probability of severe obesity from other covariates. A matching algorithm is said to match optimally subject to a fine balance constraint if the match (i) minimizes the total covariate distance within matched pairs, (ii) subject to the additional requirement that the marginal distribution of a nominal variable is exactly balanced; see Rosenbaum, Ross and Silber (2007) and Rosenbaum (1989, §3.2; 2010, Chapter 10).
Why is fine balance useful? Randomization in experiments and propensity scores in observational studies balance observed covariates stochastically, and randomization also balances unobserved covariates, but neither has much success in balancing many small strata because of imbalances that occur in small strata by chance. If a completely randomized trial had 20 strata with 5 patients per stratum, then the binomial distribution yields a 73% chance that at least one stratum will have maximal imbalance, that is, only treated subjects or only controls, so that stratum provides no direct information about treatment effects. Matching with fine balance does not leave the matter to chance, instead forcing balance on a nominal variable with many categories without constraining who is matched to whom.
Fine balance was possible for thoracotomy, colectomy with or without cancer, and hip replacement, but not for knee replacement. Severe obesity is a strain on the knees, and knee surgery is common among the severely obese. In two of the 47 hospitals, namely hospitals #3 and #23, there were more severely obese patients having knee surgery than there were non-obese patients having knee surgery; see Table 1.
Table 1.
Hospital ID | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
Hospital ID j | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 |
All Not Obese Mj | 102 | 77 | 75 | 37 | 34 | 107 | 49 | 73 | 47 | 56 | 54 | 37 |
Obese nj | 59 | 43 | 94 | 30 | 19 | 70 | 25 | 22 | 37 | 30 | 35 | 14 |
Matched Not Obese mμj | 59 | 43 | 75 | 30 | 19 | 70 | 25 | 22 | 37 | 30 | 35 | 14 |
| ||||||||||||
Hospital ID j | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 |
All Not Obese Mj | 51 | 36 | 52 | 31 | 32 | 60 | 35 | 52 | 91 | 41 | 0 | 37 |
Obese nj | 34 | 29 | 35 | 30 | 20 | 19 | 30 | 26 | 40 | 12 | 2 | 15 |
Matched Not Obese mμj | 34 | 29 | 35 | 30 | 20 | 19 | 30 | 26 | 40 | 16 | 0 | 15 |
| ||||||||||||
Hospital ID j | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 |
All Not Obese Mj | 57 | 48 | 138 | 91 | 57 | 28 | 62 | 55 | 52 | 35 | 48 | 54 |
Obese nj | 19 | 47 | 41 | 50 | 16 | 13 | 32 | 15 | 23 | 23 | 9 | 15 |
Matched Not Obese mμj | 19 | 47 | 41 | 50 | 17 | 13 | 32 | 23 | 23 | 23 | 14 | 18 |
| ||||||||||||
Hospital ID j | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | |
All Not Obese Mj | 92 | 121 | 28 | 50 | 59 | 22 | 66 | 72 | 92 | 91 | 12 | |
Obese nj | 43 | 66 | 15 | 16 | 34 | 16 | 23 | 48 | 47 | 42 | 7 | |
Matched Not Obese mμj | 43 | 66 | 15 | 16 | 34 | 16 | 23 | 48 | 47 | 42 | 7 |
How can one match to minimize the total covariate distance subject to the constraint that a nominal variable is as close as possible to fine balance?
1.2 Goal: close individual matches that minimize deviations from fine balance
We develop a new algorithm that minimizes the total covariate distance within matched pairs while coming ‘as close as possible to fine balance.’ As is typically done in combinatorial optimization (e.g., Papadimitriou and Steiglitz 1982), the new problem is solved by reducing it to another problem for which a fast algorithm exists. One version of the algorithm in §3 uses the optimal assignment algorithm in a new way with an augmented distance matrix and Proposition 1 proves that this reduction to the assignment problem does indeed solve the optimal near-fine matching problem. A second version of the algorithm in the Web-Appendix uses minimum cost flow in a network. See §1.3 for brief review, references and availability of software for optimal assignment and minimum cost flow.
Actually, ‘as close as possible to fine balance’ is not a well-defined notion, and the algorithm permits the user to choose among several alternative definitions. For instance, one definition distributes the excess from hospitals 3 and 23 among other hospitals to minimize the total covariate distance. Another definition minimizes the total covariate distance while distributing the excess from hospitals 3 and 23 as uniformly as possible among the other hospitals. A third option minimizes a chi-square-like statistic; see (4) below.
Our algorithm comes ‘as close as possible to fine balance,’ but how close that is will depend upon the data at hand. The investigator will need to examine the degree of balance produced by coming ‘as close as possible to fine balance,’ as in Table 1 for the OBSOS study. In OBSOS, a near-fine match is very close to fine balance. If ‘as close as possible to fine balance’ is not close enough, the investigator may need to abandon pair matching of the entire treated group in favor of some more flexible design, such as optimal full matching or optimal subset matching (Rosenbaum 1991, 2011; Hansen and Klopfer 2006). In any event, by coming ‘as close as possible to fine balance,’ the results produced by the algorithm will provide a clear basis for a decision about this aspect of study design.
1.3 Review: optimal assignment algorithms and network optimization
Among combinatorial optimization algorithms, the assignment algorithm is one of the most widely available and studied; see Dell’Amico and Toth (2000). Bertsekas (1981) provides Fortran code for his auction algorithm which is available in R in the pairmatch function of Hansen’s (2007) optmatch package. Bergstralh et al. (1996) discuss optimal matching in SAS. Papadimitriou and Steiglitz (1982) provide a worst-case time bound of O(I3) for one assignment algorithm, where I is the number of subjects available for matching. For comparison, if you multiply two I × I matrices in the usual way, the time required is O(I3). A different class of algorithms for optimal matching in statistics is discussed by Lu et al. (2011). For a survey of matching in observational studies, see Stuart (2010).
The alternative formulation of the problem in the Web-Appendix in terms of network optimization requires specialized programming in currently available statistical packages. The first author has created an R package called finebalance that implements the network formulation. This solves the implementation problem for R users. In light of this, we discuss the solution using the assignment algorithm in §3 and briefly the solution using network optimization in the Web-Appendix.
For discussion of some other applications of optimal multivariate matching in various fields, see Ahmed et al. (2006), Apel et al. (2010), Guan et al. (2009), Heller et al. (2009), Marcus et al. (2008), and Stuart and Green (2007). Matching is one form of adjustment for observed covariates relevant to nonparametric identification; see, for instance Tan (2006) or Imai et al. (2010).
1.4 Outline
The paper is organized as follows. Section 2 develops notation and defines the optimization problem. Intuition is built up in §3.1 and §3.2 by considering two tiny examples, and then a general procedure and proof is given in §3.3 using the assignment algorithm. Extensions to matching with L ≥ 1 controls are straightforward and are discussed in §2.2 and the Web-Appendix. The OBSOS study faced an additional problem not mentioned in §1.1, namely a severe shortage of non-obese diabetics for use as controls, and a modification of the procedure in §3.3 is described in §4 that additionally constrains the match so that every one of the rare and therefore highly informative, non-obese diabetics is included in the matched sample. In §5, the near-fine matched sample is constructed for the example in §1.1, and in §5.2 the near-fine match is contrasted with a conventional match for the same data. An alternative but equivalent formulation in terms of network optimization is described in the Web-Appendix; it can be more efficient in its use of computer memory. Finally, §6 discusses other related matching problems that can be solved with the same approach.
2. Notation, Definitions, and Statement of the Problem
2.1 Minimum distance pair matching
There are T treated subjects, 𝘛 = {τ1, …, τT} and C ≥ T potential controls, 𝘊 = {γ1, …, γC} with a nonnegative, possibly infinite, distance δτtγc ≥ 0 between τt and γc. In effect, an infinite distance, δτt,γc = ∞, will forbid matching τt to γc. Write Δ for the T × C matrix of δτt,γc. In modern practice, δtc is some form of robust Mahalanobis distance with a caliper based on a propensity score; see Rosenbaum (2010, Part II) for review of these standard devices. For a finite set A write |A| for the number of elements of A, so |𝘛| = T.
A pair matching is a function μ : 𝘛 → 𝘊 such that whenever , that is, each treated subject τt is matched to a different control, μ(τt). Without further constraints, an optimal pair matching is one that minimizes the total distance within the T matched pairs, that is, μ(·) minimizes Στt∈𝘛 δτt,μ(τt). Although there are C!/(C − T)! possible matchings μ(·), it is possible to find an optimal assignment in at most O{(T + C)3} arithmetic operations using the optimal assignment algorithm; see Papadimitriou and Steiglitz (1982).
There is a nominal variable ν with J integer values, that is, ν : 𝘛 ∪ 𝘊 → {1, 2, …, J}. In §1, J = 47 and ν(τt) is the hospital that performed surgery on obese patient τt. A match μ(·) is finely balanced if the T treated subjects in 𝘛 and their T matched controls in μ(𝘛) = {μ(τt), t ∈ 𝘛} ⊆ 𝘊 have the same number of individuals with each value of the nominal variable, that is if
(1) |
Importantly, (1) is a constraint on the marginal distributions of ν(·), not on who is matched to whom, that is, not on the joint distribution of ν(τt) and ν{μ(τt)}. An optimal finely balanced match satisfies (1) and minimizes the total covariate distance Στt∈𝘛 δτtμ(τt) among all matches μ that satisfy (1).
The constraint (1) is not always feasible: there may be no match μ such that (1) is true. Write nj = |{τt ∈ 𝘛 : ν(τt) = j}|, Mj = |{γc ∈ 𝘊 : ν(γc) = j}|, and mμj = |{τt ∈ 𝘛 : ν{μ(τt)} = j}|, so (1) says nj = mμj, but of necessity mμj ≤ Mj for every μ, so no matching μ can satisfy (1) if nj > Mj. In Table 1, n3 = 94 > 75 = M3, so no finely balanced match exists.
A near-fine optimal match is one that minimizes the total distance Στt∈𝘛 δτt,μ(τt) among all matches μ that make the mμj as close as possible to the nj. Because there are J differences nj − mμj, there are actually several senses in which they may be made as close as possible. For a function f : A → B, the constraint f = min means that a feasible solution must be in the set {a ∈ A : f(a) = mina′∈A f(a′)}.
For instance, if the total of the absolute differences |nj − mμj| is minimized. For any pair-match, the total number of treated subjects equals the total number of controls, , so positive nj − mμj must counterbalance negative nj − mμj. In §1, there are n3 − M3 = 94 − 75 = 19 extra obese knee surgeries from hospital j = 3 and n23 − M23 = 2 −0 = 2 extra obese knee surgeries from hospital j = 23, or 19 + 2 = 21 extra patients in total; these 21 extra patients must be distributed among the other 47 − 2 = 45 hospitals. In Table 1, the minimum value of for a match is 42, because n3 − mμ3 ≥ 19 and n23 − mμ,23 ≥ 2 with , so the minimum value of is 2 × (19 + 2) = 42, and the constraint is the same as the constraint .
Write dμ(j) for the jth largest |nj − mμj|, so dμ(1) ≤ ··· ≤ dμ(J), and dμ = {dμ(1), …, dμ(J)}T. By dμ = min we mean: dμ(J) = min, and subject to this condition dμ(J−1) = min, and so on. In Table 1, dμ = min entails dμ(47) = 19 because of hospital j = 3, dμ(46) = 2 because of hospital j = 23, dμ(45) = ··· = dμ(25) = 1 and dμ(24) = ··· = dμ(1) = 0; then the 21 control patients not available from hospitals 3 and 23 are drawn instead from 21 other hospitals taking one patient per hospital.
Three of the many possible precise definitions of near-fine optimal match follow:
(2) |
(3) |
and
(4) |
The version (4) is equivalent to minimizing the one-sample chi-square statistic in which the nj act as the “expected counts.” One can impose other sorts of constraints, such as max1≤j≤J |nj − mμj| ≤ β or max1≤j≤J |nj − mμj|/nj ≤ β instead of the constraints in (2)–(4) or in addition to these constraints, and the finebalance function in the R package finebalance permits a wide variety of combinations.
Our suggestion is to begin with the constraint (2), check the resulting (nj, mμj)’s, and consider alternative constraints only if some of the (nj, mμj) seem unacceptably discrepant.
2.2 Matching with L ≥ 1 controls per treated subject
With many more potential controls than treated subjects, T ≪ C, one may wish to match each treated subject to L ≥ 1 controls, where C/T ≥ L. Optimal near-fine matching with L ≥ 1 may be solved as a special case of optimal near-fine pair matching. To match with L = 2 controls, duplicate the treated group, find the optimal match, then ‘remember’ that the two copies of each treated subject are actually the same person yielding a 1-to-2 match. Specifically, to match with L = 2 ≤ C/T controls, replace 𝘛 = {τ1, …, τT} by with for each t, c, and with τt and having the same value for the nominal covariate, . Then a minimum distance near-fine pair match of 𝘛* with 𝘊 is a minimum distance near-fine match of 𝘛 to L = 2 controls in 𝘊. The case of L ≥ 3 is similar. An alternative but equivalent approach is described in the Web-Appendix.
3. Near-Fine Balance Using the Assignment Algorithm
3.1 A small example
In the current section, we discuss augmenting the distance matrix Δ so that the assignment algorithm solves (2). For instance, this could be done in SAS using proc assign or in R using the pairmatch function of Hansen’s (2007) optmatch package.
Before describing the general procedure in §3.3, a toy example is presented in Table 2 and another in Table 3. It has T = 5 treated subjects, with τ1, τ2, and τ3 in hospital ν(τt) = 1, τ4 in hospital ν(τ4) = 2, and τ5 in hospital ν(τ5) = 3. Fine balance is not possible because there are only two controls in hospital 1, namely γ1 and γ2, but there are three treated subjects in hospital 1. Table 2 augments the distance matrix Δ by adding two rows, labeled ε21 and ε31 and one column ξ1 to produce a 7 × 7 = K × K matrix ϒ; that is, Table 2 is ϒ. Write υkℓ for the element of ϒ in row k and column ℓ. Assume each δτt,γc in Δ satisfies 0 ≤ δτt,γc ≤ ∞. Consider any assignment α(·) in ϒ with finite distance . In this assignment, no treated subject τt will be assigned to ξ1 because the total distance would then be ∞; so α(τt) ≠ ξ1 for t = 1, …, T. For the same reason, α(ε21) must equal γ3 or γ4 or ξ1, and α(ε31) must equal γ5 or γ6 or ξ1. Finally, either α(ε21) = ξ1 or α(ε31) = ξ1; otherwise, α(τt) = ξ1 for some t, and, as just noted, this cannot happen. Define the match μ(τt) = α(τt) for t = 1, …, T. It is easy to see that any match μ(·) built in this way from an assignment α(·) in ϒ with finite distance satisfies the constraint in (2): μ(·) has mμ1 = 2 and either (mμ2, mμ3) = (2, 1) or (mμ2, mμ3) = (1, 2), whereas n1 = 3, n2 = 1, n3 = 1, so . Moreover, for any assignment α(·) in ϒ with finite distance, we have because υ6,α(6) = υ7,α(7) = 0. Conversely, every match μ(·) with corresponds with an assignment α(·) such that υ6,α(6) = υ7,α(7) = 0 and υt,α(t) ≠ ξ1 for t = 1, …, 5. Finally, if α(·) is an optimal assignment with finite distance, that is, if it minimizes and the minimum value is finite, then μ(·) solves (2) with . Indeed, in this very special case, the solution also solves (3) and (4).
Table 2.
𝘊 | γ1 | γ2 | γ3 | γ4 | γ5 | δ6 | ξ1 | |
---|---|---|---|---|---|---|---|---|
𝘛 | ν | 1 | 1 | 2 | 2 | 3 | 3 | — |
τ1 | 1 | δ11 | δ12 | δ13 | δ14 | δ15 | δ16 | ∞ |
τ2 | 1 | δ21 | δ22 | δ23 | δ24 | δ25 | δ26 | ∞ |
τ3 | 1 | δ31 | δ32 | δ33 | δ34 | δ35 | δ36 | ∞ |
τ4 | 2 | δ41 | δ42 | δ43 | δ44 | δ45 | δ46 | ∞ |
τ5 | 3 | δ51 | δ52 | δ53 | δ54 | δ55 | δ56 | ∞ |
| ||||||||
ε21 | — | ∞ | ∞ | 0 | 0 | ∞ | ∞ | 0 |
ε31 | — | ∞ | ∞ | ∞ | ∞ | 0 | 0 | 0 |
Table 3.
𝘊 | γ1 | γ2 | γ3 | γ4 | γ5 | γ6 | γ7 | γ8 | γ9 | γ10 | ξ1 | |
---|---|---|---|---|---|---|---|---|---|---|---|---|
𝘛 | ν | 1 | 1 | 2 | 2 | 2 | 2 | 3 | 3 | 3 | 3 | — |
τ1 | 1 | δ11 | δ12 | δ13 | δ14 | δ15 | δ16 | δ17 | δ18 | δ19 | δ1,10 | ∞ |
τ2 | 1 | δ21 | δ22 | δ23 | δ24 | δ25 | δ26 | δ27 | δ28 | δ29 | δ2,10 | ∞ |
τ3 | 1 | δ31 | δ32 | δ33 | δ34 | δ35 | δ36 | δ37 | δ38 | δ39 | δ3,10 | ∞ |
τ4 | 1 | δ41 | δ42 | δ43 | δ44 | δ45 | δ46 | δ47 | δ48 | δ49 | δ4,10 | ∞ |
τ5 | 1 | δ51 | δ52 | δ53 | δ54 | δ55 | δ56 | δ57 | δ58 | δ59 | δ5,10 | ∞ |
τ6 | 2 | δ61 | δ62 | δ63 | δ64 | δ65 | δ66 | δ67 | δ68 | δ69 | δ6,10 | ∞ |
τ7 | 3 | δ71 | δ72 | δ73 | δ74 | δ75 | δ76 | δ77 | δ78 | δ79 | δ7,10 | ∞ |
| ||||||||||||
ε21 | — | ∞ | ∞ | 0 | 0 | 0 | 0 | ∞ | ∞ | ∞ | ∞ | 0 |
ε31 | — | ∞ | ∞ | ∞ | ∞ | ∞ | ∞ | 0 | 0 | 0 | 0 | 0 |
ζ21 | — | ∞ | ∞ | 0 | 0 | 0 | 0 | ∞ | ∞ | ∞ | ∞ | ∞ |
ζ31 | — | ∞ | ∞ | ∞ | ∞ | ∞ | ∞ | 0 | 0 | 0 | 0 | ∞ |
3.2 A second small example
The procedure in §3.1 augments the distance matrix Δ so that the assignment algorithm solves (2), but that approach does not generally solve problems of the form (3) or (4). Problem (2) is concerned only with the total, , whereas problem (3) is concerned to make individual |nj − mμj| as small as possible.
Consider the small example in Table 3 which has the seven treated subjects τt and ten controls γc. Fine balance is infeasible: there are five treated subject and two controls with ν = 1, so |n1 − mμ1| ≥ 3 for every match and the minimum value of is 6. Problem (2) would allow seven controls to be selected so that |n1 − mμ1| = 3, |n2 − mμ2| = 3, |n3 − mμ3| = 0 with , but problems (3) and (4) would each insist that |n1 − mμ1| = 3, |n2 − mμ2| = 2, |n3 − mμ3| = 1 or |n1 − mμ1| = 3, |n2 − mμ2| = 1, |n3 − mμ3| = 2 with . In other words, problem (2) would permit the use of 1, 2, 3 or 4 controls with ν(γc) = 2 (and similarly for ν(γc) = 3), but problems (3) and (4) would each insist that dμ = {dμ(1), dμ(2), dμ(3)}T = (1, 2, 3)T.
In Table 3, the 7 × 10 distance matrix Δ is augmented into an 11 × 11 = K × K matrix ϒ in a manner similar to but slightly different from Table 2. In Table 3, two rows, ε21 and ε31, resemble the augmenting rows in Table 2. Two additional rows, ζ21 and ζ31, are almost the same except in the ξ1 column where the ε’s have a 0 and the ζ’s have an ∞.
An assignment α(·) in ϒ with finite total distance is easily seen to satisfy dμ = {dμ(1), dμ(2), dμ(3)}T = (1, 2, 3)T by reasoning as follows. To have , the assignment α(·) must avoid the ∞’s, so one of γ3, γ4, γ5, γ6 must be assigned to ζ21 and one of γ7, γ8, γ9, γ10 must be assigned to ζ31. Also, if then either ε21 is paired with one of γ3, γ4, γ5, γ6 and ε31 is paired with ξ1 or else ε31 is paired with one of γ7, γ8, γ9, γ10 and ε21 is paired with ξ1. In consequence, the match μ(·) formed by restricting the assignment α(·) to 𝘛 uses both γ1 and γ2 and two or three of γ3, γ4, γ5, γ6 and two or three of γ7, γ8, γ9, γ10 so dμ = {dμ(1), dμ(2), dμ(3)}T = (1, 2, 3)T.
3.3 A general procedure
Problems (2)–(4) are each special cases of a more general problem, namely
(5) |
where κj ≤ κ̄j are numbers that are determined by the nj’s and Mj’s. In problem (2), κj = min (nj, Mj) and κ̄j = Mj.
The general procedure for (5) is as follows.
Add rows. Augment the T × C distance matrix Δ by appending rows defined as follows. For j = 1, …, J, append κ̄j − κj rows εjp, p = 1, …, κ̄j − κj, with the distance between εjp and γc equal to 0 if ν(γc) = j and equal to ∞ otherwise. For j = 1, …, J, append Mj − κ̄j rows ζjp, p = 1, …, Mj − κj, with the distance between ζjp and γc equal to 0 if ν(γc) = j and equal to ∞ otherwise. Call this matrix Λ.
Add columns. Augment the (T + R) × C matrix Λ by appending T + R − C columns ξq, q = 1, …, T + R − C defined as follows. The distance between τt and ξq is ∞ for all t, q, the distance between εjp and ξq is zero for all jp, q, and the distance between ζjp and ξq is ∞ for all jp, q. Write K = T + R and call this K × K matrix ϒ.
Find an optimal assignment. Find an optimal assignment α(·) in ϒ.
Remove extraneous material. Define the match μ(τt) = α(τt) for t = 1, …, T.
If Mj ≥ nj for j = 1, …, J, then: (i) exact fine balance is feasible, (ii) R = C − T and K = C so no columns ξq are appended, and (iii) the algorithm reduces to the procedure in Rosenbaum, Ross and Silber (2007). The proof of Proposition 1 is in the Appendix.
Proposition 1
If this optimal assignment α(·) produced by the above procedure has infinite total distance, , then there is no solution to (5) having finite total distance. Conversely, if then μ(τt) = α(τt) for t = 1, …, T solves (5). In the worst case, the solution runs in polynomial time, specifically in O(K3) = O{(T + C)3} arithmetic operations.
4. Forcing the use of certain controls
In §1.1, an additional issue concerns diabetes. Diabetes is more common among the obese, and indeed among the 1430 severely obese patients undergoing knee surgery, there were 510 diabetics, whereas among the 2696 non-obese knee surgeries there were only 467 diabetics. Even if all of the 467 non-obese diabetes were included as matched controls, there would be a small deficit, and nothing in the procedure in §3.3 ensures that all 467 diabetic controls will be included in the matched sample. There is a simple adjustment to the procedure in §3.3 that adds an additional constraint to the one in (5), namely that all 467 diabetic controls be included in the match, and then minimizes the total distance subject to both constraints. Let 𝘚 ⊂ 𝘊 be the subset of potential controls who are diabetic. To force a subset 𝘚 ⊂ 𝘊 of controls to be included in the match: if γc ∈ 𝘚 and ν(γc) = j then (i) change the entry in ϒ for row εjp and γc from 0 to ∞, (ii) change the entry in ϒ for row ζjp and γc from 0 to ∞, and (iii) call the result ϒ𝘚. Reasoning parallel to the proof of Proposition 1 shows that a finite minimum distance assignment in this adjusted matrix ϒ𝘚 is a minimum distance match subject to the two constraints that all γc ∈ 𝘚 be matched and κj ≤ mμj ≤ κ̄j, j = 1, …, J. Conversely, if δτt,γc < ∞ for all τt, γc, then an infinite minimum distance assignment in ϒ𝘚 indicates that there is no match μ that uses all controls γc ∈ 𝘚 and satisfies κj ≤ mμj ≤ κ̄j, j = 1, …, J. For instance, in Table 3, if all δτt,γc < ∞ and 𝘚 = {γ3, γ4, γ5}, then a minimum distance assignment α(·) with finite distance exists having α(ζ21) = γ6 and α(ε21) = ξ1. However, if 𝘚 = {γ3, γ4, γ5, γ7, γ8, γ9} then an optimal assignment α(·) in ϒ𝘚 must have infinite total distance, and if all δτt,γc < ∞ this signifies the infeasibility of joint requirements γc ∈ 𝘚 and κj ≤ mμj ≤ κ̄j, j = 1, …, J.
The procedure above forces the use of a subset 𝘚 ⊂ 𝘊 of controls when constructing a match with near-fine balance for a nominal variable such as the 47 hospitals. In some other context, one might wish to force the use of all 467 diabetic controls without fine balance. To force the use of a subset 𝘚 ⊂ 𝘊 of controls in optimal matching without fine balance, begin with the T ×C matrix Δ of distances, and append C – T rows having C columns with ∞ in columns for γc ∈ 𝘚 and 0 in columns for γc ∉ 𝘚, calling the resulting C×C matrix Ψ with ψkℓ in row k and column ℓ. An assignment α (·) in Ψ defines a match as μ (τt) = α (τt) ∈ 𝘊, t = 1, …, T. A minimum distance assignment α (·) in Ψ with finite total distance is a minimum distance match with subject to the constraint that for each γc ∈ 𝘚 there is a τt ∈ 𝘛 such that γc = μ (τt).
5. Matching in the Study of Obesity and Surgical Outcomes
5.1 A near-fine match
As noted in §1, fine balance was not achievable for knee surgery in Table 1 because two hospitals performed more knee surgeries on the severely obese with a BMI of 35 or more than among the non-obese with a BMI between 20 and 30. The matching will solve (2), coming as close to fine balance on the hospital as possible, with the additional constraint in §4 that all 467 diabetic controls be included in the match.
In addition to the seven covariates mentioned in §1 and an indicator for a missing Apache score (Rosenbaum 2010, §13), the match will use an analog of the propensity score, namely an estimated probability of obesity given these five covariates, making seven covariate in total; see Rosenbaum and Rubin (1985) for discussion of the propensity score in matching. The distance δτt,γc used a caliper on the obesity probability implemented using a penalty function together with a robust version of the Mahalanobis distance; see Rosenbaum (2010, Part II) for specifics of these standard matching techniques.
Figure 1 depicts the distribution of the four continuous covariates among the 1430 severely obese patients undergoing knee surgery, their 1430 matched controls, and the 1266 unmatched potential controls. The unmatched potential controls are older, have lower estimated obesity probabilities and slightly higher but still very low estimated log-odds of death. For the four variables in Figure 1, the Spearman rank correlation between the severely obese patient and the matched control was 0.93 for age, 0.81 for the Apache Score, 0.91 for the obesity probability, and 0.82 for the risk score. All 467 diabetic controls were included in the match, but this was still somewhat less than the 510 diabetics among the severely obese. In total, 84% of pairs were matched for diabetes and 91% were matched for sex.
Table 1 shows the distribution of matched patients mμj by hospital. Hospitals 3 and 23 had too few non-obese controls to permit fine balance, and their deficit of 19 + 2 = 21 controls is made up by other hospitals, for instance, hospital 22 which contributed 4 extra controls and hospital 29 which contributed 1 extra control. Recall that (2) seeks to minimize the total covariate distance within matched pairs subject to the constraint that the total deviation from fine balance is as small as possible. This is a constraint on the marginal distribution of hospital variable, but no attempt is made to match patients to other patients in the same hospital; rather, the pairing emphasizes clinically important variables such as diabetes, age and the Apache and risk scores. In particular, only 45 of 1430 pairs or 3% contain two patients from the same hospital. In Table 1, the Pearson chi-square statistic for the 47 × 2 table hospital × obese-vs-matched-control is 7.8 which is expected to equal its degrees of freedom of 46 in a completely randomized experiment, so the marginal distributions are much closer than they would be in a completely randomized experiment.
5.2 Comparison of the near-fine match with two conventional matches
The near-fine match in §5.1 will now be compared to two conventional optimal matches, called μ1 and μ2. Both μ1 and μ2 are minimum distance matches using the robust Mahalanobis distance with penalty function calipers on the propensity score, but without the augmentation in §3.3 to force near-fine balance on the hospital indicators and without the forced use of all nonobese diabetics. In μ1 the hospitals are ignored in the matching. In μ2, the hospitals are included in both the propensity score and the robust Mahalanobis distance.
Before matching, in the obese group, there were 510 diabetics, or 35.7% = 510/1430, whereas in the nonobese group there were only 467 diabetics or 17.3% = 467/2696, and exact balance for diabetes is not possible. Consider the 2 × 2 table recording obesity by diabetes in the matched samples and its associated chi-square test for independence. In §5.1, the match came as close as possible to balance using all 467 diabetic controls, the matched controls were 32.7% = 467/1430 diabetic, and the chi-square P-value was 0.098, so the balance is imperfect but an imbalance of this magnitude would not be extremely unusual under complete randomization of 2 × 1430 patients to two unmatched groups of equal size. In contrast, the μ1 match tried to match for diabetes, including it in both the propensity score and the robust Mahalanobis distance, but it picked as matched controls only 374/467 available diabetics, so its control group was 26.2% = 374/1430 diabetic, with a p-value of 4.7×10−8. The μ2 match also tried to match for diabetes, but it picked as matched controls only 368/467 available diabetics, so its matched control group was 25.7% = 368/1430 diabetic, with a p-value of 1.1×10−8. In brief, in §5.1, it was helpful to use the augmentation of the distance matrix in §4 to force the use of all diabetic controls in the marginal distribution separate from the attempt to match individual diabetics to diabetics.
Consider now the absolute difference in the number of obese and nonobese patients in each of the 47 hospitals, that is, 47 absolute differences. For the near-fine match in §5.1, all of the quartiles of these absolute differences were zero patients, the mean absolute difference was 0.89 patients and the maximum absolute difference was 19 patients for hospital #3 which could not have an absolute difference less than 19. For the μ1 match, the three quartiles of the absolute differences were 3, 9, and 14.5, the mean difference was 10.0 patients, with a maximum difference of 53 patients in hospital #3. For the μ2 match, the three quartiles of the absolute differences were 1, 3, and 5, the mean difference was 4.0 patients, with a maximum difference of 27 patients in hospital #3. Consider the 2 × 47 table recording obesity by hospital. In this table, the P-value from the chi-square test of independence is 1.00 for the near-fine match in §5.1, is 1.2 × 10−8 for the μ1 match which ignored the hospitals, and is 0.998 for the μ2 match. In brief, the best balance on hospitals is from the near-fine match, though the μ2 match exhibits better balance than expected from complete randomization of 2 × 1430 patients; however, the μ1 match is not usable.
Finally, the cross-match test in Heller et al. (2010 or the crossmatch package in R) was used to examine the multivariate balance on the seven covariates. That method takes the matched pairs, forgets for a moment who is matched to whom, rematches subjects using their covariates alone (using optimal nonbipartite matching), and counts the number of times a treated subject was rematched to a control. If the cross-match test were applied to data from a completely randomized experiment with treated and control groups of equal size, the cross-match-probability that a rematched pair contains one treated subject and one control is 1/2. When applied to the near-fine match in §5.1, the P-value from the cross-match test was 0.52, and the estimate of the cross-match-probability was 0.50, so this method judges the multivariate imbalance on the seven covariates to be not unlike the imbalance produced by complete randomization of 2×1430 patients. In contrast, the same test applied to the μ1 match yields a P -value of 1.00 and an estimate of the cross-match-probability of 0.59, so the balance on the seven covariates is much better than expected from complete randomization. For the μ2 match, the crossmatch P -value is 0.31 and an estimate of the cross-match-probability is 0.49. Judged by this standard, the balance on the seven covariates is best for μ1 which ignored the hospitals, but is acceptable for all three matches.
In brief, the near-fine match in §5.1 had reasonable balance for the 7 covariates, for diabetes in particular, and excellent balance for the 47 hospitals. The other two matches, μ1 and μ2, were unacceptable for diabetes, and μ1 was unacceptable for the hospitals.
6. Discussion: interactions, extensions
Minimum distance fine or near-fine matching may address interactions among covariates in several ways. First, the nominal variable ν (·) may itself be an interaction, for instance not 47 hospitals but 47 × 3 = 141 categories from the 47 hospitals and three 5-year age categories, (66, 70], (70, 75], (75, 80]. Second, concerning interactions between the nominal variable ν(·) and other covariates, the distance δτt,γc may include an added penalty for matching a patient in one hospital to a patient in another hospital; then, the algorithm will prefer to match patients with similar covariates in the same hospital recognizing that this is not always possible. Alternatively or additionally, the distance δτt,γc may include covariates that describe the hospital, such as hospital volume or teaching status; then, the algorithm will prefer to match similar patients in similar hospitals. Finally, a propensity score can include covariates that describe the hospital as well as the patient and can include interaction terms; then, a caliper on the propensity incorporated in δτt,γc will tend to balance hospital as well as patient characteristics and also their interactions. See Rosenbaum (2010, Part II) for discussion of the use of penalties and calipers in minimum distance matching.
When fine balance is not feasible, the algorithms in §3.3 and the Web-Appendix minimize the total covariate distance Στt∈𝘛 δτt,μ(τt) within matched pairs among all matched samples with minimal deviation from fine balance. In fact, these algorithms can be used in other ways. The algorithms create a family of methods with exact fine balance at one extreme and with no attempt at fine balance at the other extreme.
Specifically, by a suitable choice of (κj, κ̄j), j = 1, …, J, the algorithms in §3.3 and the Web-Appendix may be used to minimize Στt∈𝘛 δτt,μ(τt) while producing a controlled rather than minimal deviation from fine balance. For example, suppose that fine balance is feasible because Mj > nj ≥ 1 for every j. In this case, if one set (κj, κ̄j) = (nj − 1, nj + 1), j = 1, …, J, then the resulting match would deviate from fine balance by at most 1 in each hospital, but because the constraint is less constraining, the minimum value of the total covariate distance Στt∈𝘛 δτt,μ(τt) will be no larger than before and is very likely to be smaller. Setting κj = max(0, nj − λ) and κ̄j = min (Mj, nj + λ) for an integer λ ≥ 0 will limit the maximum deviation from fine balance to at most λ. For λ = 0, this yields fine balance. For sufficiently large λ this yields a conventional minimum distance match that makes no effort to balance the nominal variable. By varying λ, the investigator can control the relative emphasis placed on balancing the nominal variable versus finding pairs that are close in terms of the covariate distance.
Acknowledgments
Supported by grants from NSF and grant R01-DK073671 from NIDDK.
Appendix. The proof of Proposition 1
The proof of Proposition 1 parallels the discussion of Tables 2 and 3. Because each υkℓ ≥ 0, if then . The first step is to show that if and only if κj ≤ mμj ≤ κ̄j for j = 1, …, J, where mμj = |{τt ∈ 𝘛 : ν {μ (τt)} = j}|. Now if and only if the Mj − κ̄j rows ζjp are assigned to different columns γc with ν (γc) = j, and at most κ̄j − κj rows εjp are assigned to other columns γc with ν (γc) = j; therefore, of the Mj columns γc with ν (γc) = j, at least Mj − κ̄j are not paired with τt’s and at most Mj − κj are not paired with τt’s, so at least κj and at most κ̄j columns γc with ν (γc) = j are paired with τt’s. The second step is to note that if then and
so an optimal assignment α (·) in ϒ with minimizes the total distance in matched pairs Στt∈𝘛 δτt,μ(τt) subject to the constraint κj ≤ mμj ≤ κ̄j for j = 1, …, J. The time bound is for the Hungarian method applied to a K × K assignment problem; see Papadimitriou and Steiglitz (1982, Theorem 11.1).
Footnotes
Supplementary Materials
The Web-Based Appendix mentioned in §2 is available under the Paper Information link at the Biometrics website http://www.biometrics.tibs.org, which describes an algorithm for near-fine matching using minimum cost flow in a network rather than using the optimal assignment algorithm. The first author’s R package finebalance uses network optimization.
References
- Ahmed A, Perry GJ, Fleg JL, Love TE, Goff DC, Kitzman DW. Outcomes in ambulatory chronic systolic and diastolic heart failure: a propensity analysis. American Heart Journal. 2006;152:956–966. doi: 10.1016/j.ahj.2006.06.020. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Apel R, Blokland AAJ, Nieuwbeerta P, van Schellen M. The impact of imprisonment on marriage and divorce: a risk set matching approach. Journal of Quantitative Criminology. 2010;26:269–300. [Google Scholar]
- Bergstralh EJ, Kosanke JL, Jacobsen SL. Software for optimal matching in observational studies. Epidemiology. 1996;7:331–332. [PubMed] [Google Scholar]
- Bertsekas DP. A new algorithm for the assignment problem. Mathematical Programming. 1981;21:152–171. [Google Scholar]
- Dell’Amico M, Toth P. Algorithms and codes for dense assignment problems: the state of the art. Discrete Applied Mathematics. 2000;100:17–48. [Google Scholar]
- Guan WH, Liang LM, Boehnke M, Abecasis GR. Genotype-based matching to correct for population stratification in large-scale case-control genetic association studies. Genetic Epidemiology. 2009;33:508–517. doi: 10.1002/gepi.20403. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Hansen BB, Klopfer SO. Optimal full matching and related designs via network flows. Journal of Computational and Graphical Statistics. 2006;15:609–627. [Google Scholar]
- Hansen BB. Optmatch. R News. 2007;7:18–24. [Google Scholar]
- Hansen BB. Prognostic analogue of the propensity score. Biometrika. 2008;95:481–8. [Google Scholar]
- Heller R, Manduchi E, Small DS. Matching methods for observational microarray studies. Bioinformatics. 2009;25:904–909. doi: 10.1093/bioinformatics/btn650. [DOI] [PubMed] [Google Scholar]
- Heller R, Rosenbaum PR, Small DS. Using the cross-match test to appraise covariate balance in matched pairs. American Statistician. 2010;64:299–309. [Google Scholar]
- Imai K, Keele L, Yamamoto T. Identification, inference and sensitivity analysis for causal mediation effects. Statistical Science. 2010;25:51–71. [Google Scholar]
- Knaus WA, Wagner DP, Draper EA. The APACHE III prognostic system. Chest. 1991;100:1619–1636. doi: 10.1378/chest.100.6.1619. [DOI] [PubMed] [Google Scholar]
- Lu B, Greevy R, Xu X, Beck C. Optimal nonbipartite matching and its statistical applications. American Statistician. 2010;65:21–30. doi: 10.1198/tast.2011.08294. (Package nbpMatching in R.) [DOI] [PMC free article] [PubMed] [Google Scholar]
- Marcus SM, Siddique J, Ten Have TR, Gibbons RD, Stuart E, Normand SL. Balancing treatment comparisons in longitudinal studies. Psychiatric Annals. 2008;38:805–811. doi: 10.3928/00485713-20081201-05. [DOI] [PMC free article] [PubMed] [Google Scholar]
- R Development Core Team. R. Vienna: R Foundation; 2007. [Google Scholar]
- Papadimitriou CH, Steiglitz K. Combinatorial Optimization: Algorithms and Complexity. Englewood Cliffs, NJ: Prentice Hall; 1982. [Google Scholar]
- Rosenbaum PR, Rubin DB. Constructing a control group by multivariate matched sampling methods that incorporate the propensity score. American Statistian. 1985;39:33–38. [Google Scholar]
- Rosenbaum PR. Optimal matching in observational studies. Journal of American Statistical Association. 1989;84:1024–1032. [Google Scholar]
- Rosenbaum PR. A characterization of optimal designs for observational studies. Journal of the Royal Statistical Society B. 1991;53:597–610. [Google Scholar]
- Rosenbaum PR. Observational Studies. New York: Springer; 2002. [Google Scholar]
- Rosenbaum PR, Ross RN, Silber JH. Minimum distance matched sampling with fine balance in an observational study of treatment for ovarian cancer. Journal of American Statistical Association. 2007;102:75–83. [Google Scholar]
- Rosenbaum PR. Design of Observational Studies. New York: Springer; 2010. [Google Scholar]
- Rosenbaum PR. Optimal matching of an optimally chosen subset in observational studies. Journal of Computational and Graphical Statistics. 2011 to appear. [Google Scholar]
- Silber JH, Rosenbaum PR, Trudeau ME, Even-Shoshan O, Chen W, Zhang X, Mosher RE. Multivariate matching and bias reduction in the surgical outcomes study. Medical Care. 2001;39:1048–1064. doi: 10.1097/00005650-200110000-00003. [DOI] [PubMed] [Google Scholar]
- Silber JH, Rosenbaum PR, Trudeau ME, Chen W, Zhang X, Lorch S, Rapaport-Kelz R, Mosher RE, Even-Shoshan O. Preoperative antibiotics and mortality in the elderly. Annals of Surgery. 2005;242:107–114. doi: 10.1097/01.sla.0000167850.49819.ea. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Stuart EA, Green KM. Using full matching to estimate causal effects in nonexperimental studies. Developmental Psychology. 2007;44:395–406. doi: 10.1037/0012-1649.44.2.395. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Stuart EA. Matching methods for causal inference. Statistical Science. 2010;25:1–21. doi: 10.1214/09-STS313. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Tan Z. A distributional approach to causal inference using propensity scores. Journal of American Statistical Association. 2006;101:1607–1618. [Google Scholar]