Tutorials › Multiple Imputation by Chained Equations (MICE) › Matching Distances on the Prediction Scale

Predictive Mean Matching · Tutorial 189 of 497

Matching Distances on the Prediction Scale

Learn when matching on transformed regression predictions preserves donor rankings and when the prediction scale changes which donor is nearest.

Intermediate 12 min read

What You'll Learn

  • Define absolute-distance matching for a missing case and observed donors using a common scalar prediction score.
  • Prove why a shared nonzero affine transformation preserves the ranking of donor distances.
  • Distinguish preservation of score order from preservation of nearest-donor rankings.
  • Compare distances on a GLM linear-predictor scale with distances on the fitted-mean scale.
  • Diagnose inconsistent score construction and explain why different scales can select different donors.

Why the Prediction Scale Matters

In predictive mean matching (PMM), donors are selected by comparing a missing case’s prediction with predictions for cases whose outcome is observed. The comparison requires a distance, and a distance requires a scale. For a linear regression model, the fitted value and the linear predictor coincide. For a generalized linear model, the linear predictor is transformed to obtain the fitted mean; distances between those two sets of scores need not rank donors in the same way.

This distinction is not about whether one scale is universally correct. It is about recognizing what a matching rule actually compares. If a common transformation merely shifts or rescales every score, nearest-donor rankings are unchanged. If the transformation is nonlinear, even a strictly increasing one, rankings by absolute distance can change.

Definition: Let \(i\) denote a case with a missing outcome and let \(j\) index cases with observed outcomes eligible to be donors. If \(s_i\) and \(s_j\) are their scalar prediction scores on a specified scale, the absolute matching distance is \(d_{ij}=|s_j-s_i|\). A nearest donor has the smallest such distance among the eligible cases. The score definition and scale must be the same for the target and every candidate donor.

A score may be a fitted conditional mean, a regression linear predictor, or a transformed version of one of these. The algebra below assumes the same score-generating model, predictor definitions, and parameter values are used to calculate scores for the target and donors. In an imputation iteration with a parameter draw, for example, the target and donor scores should be computed using that same draw. This ensures the comparison is between scores on a common scale.

The algebraic claims about transformations do not require that the regression model be true. However, the model and its predictors still need to be adequate for the intended imputation: if the scores fail to reflect useful outcome-related structure, a mathematically consistent distance ranking may not identify substantively suitable donors.

Affine Transformations Preserve the Ranking

Suppose every score is transformed by the same function \(T(s)=a+bs\), where \(a\) and \(b\) are constants and \(b\ne 0\). For a target \(i\) and donor \(j\), the transformed distance is

$$ d_{ij}^{(T)} =|T(s_j)-T(s_i)| =|(a+bs_j)-(a+bs_i)| =|b|\,|s_j-s_i| =|b|d_{ij}. $$

The shift \(a\) cancels, and every distance is multiplied by the same positive constant \(|b|\). Thus, for any two candidates \(j\) and \(k\), \(d_{ij}<d_{ik}\) if and only if \(d_{ij}^{(T)}<d_{ik}^{(T)}\). Equal distances remain equal as well. The result covers centering, a change of measurement units, and standardization by a fixed positive standard deviation. A negative \(b\) reverses the numerical order of scores but not their absolute-distance ranking. If \(b=0\), all transformed scores coincide and the transformation destroys the ranking rather than preserving it.

Worked Example: A Shift and Rescaling Leave the Nearest Donor Unchanged

Suppose a missing case has score \(s_i=4\), and two observed candidates have scores \(s_1=3\) and \(s_2=6\). On the original scale, their distances are

$$ d_{i1}=|3-4|=1,\qquad d_{i2}=|6-4|=2. $$

Candidate 1 is nearer. Now transform every score by \(T(s)=5-2s\). The transformed target score is \(5-2(4)=-3\), and the transformed donor scores are \(5-2(3)=-1\) and \(5-2(6)=-7\). Therefore,

$$ d_{i1}^{(T)}=|-1-(-3)|=2,\qquad d_{i2}^{(T)}=|-7-(-3)|=4. $$

Candidate 1 remains nearer. Both distances were multiplied by \(|-2|=2\), exactly as the affine calculation predicts. In particular, the transformed target score is \(-3\), not \(-1\); \(-1\) is the transformed score for candidate 1.

Nonlinear Transformations Can Change the Nearest Donor

For a general transformation \(T\), the distance becomes \(|T(s_j)-T(s_i)|\). Unless this is the same positive multiple of \(|s_j-s_i|\) for every candidate, the relative distances may change. A strictly increasing transformation preserves which score is below or above the target, and preserves the ordering of scores themselves. It does not necessarily preserve which score is closest in absolute distance.

This matters in generalized linear models. Write \(\eta\) for the linear predictor and \(\mu\) for the fitted mean, with \(\mu=g^{-1}(\eta)\) under link function \(g\). One possible rule matches on \(|\eta_j-\eta_i|\); another matches on \(|\mu_j-\mu_i|\). These rules agree when the conversion is affine, but need not agree for a nonlinear inverse link.

Worked Example: Exponential Link Changes the Ranking

Consider a hypothetical count-model score with log link, so the fitted mean is \(\mu=\exp(\eta)\). Suppose the target has \(\eta_i=1\), and two donors have \(\eta_1=0\) and \(\eta_2=1.5\). On the linear-predictor scale,

$$ |\eta_1-\eta_i|=|0-1|=1,\qquad |\eta_2-\eta_i|=|1.5-1|=0.5. $$

Donor 2 is nearer on the \(\eta\) scale. On the fitted-mean scale, the target mean is \(\exp(1)\), and the donor means are \(\exp(0)\) and \(\exp(1.5)\). Calculate the distances before rounding:

$$ |\exp(0)-\exp(1)|\approx 1.718,\qquad |\exp(1.5)-\exp(1)|\approx 1.763. $$

Donor 1 is slightly nearer on the fitted-mean scale. Thus, although the exponential transformation is strictly increasing and leaves the score order intact, it reverses the nearest-donor ranking in this example. The reason is that the exponential function stretches differences more at larger values of \(\eta\).

The effect is not unique to the exponential function. A logistic inverse link can also change distances. The next example uses the same model for all three cases and compares its linear predictor with its fitted probability.

Worked Example: Logistic Scores Can Favor a Different Donor

Suppose the target has \(\eta_i=2\), while two observed cases have \(\eta_1=1\) and \(\eta_2=3.2\). On the linear-predictor scale, the distances are \(1\) and \(1.2\), so donor 1 is nearer. For the logistic inverse link, \(\mu=1/(1+\exp(-\eta))\). The fitted probabilities are approximately \(0.8808\) for the target, \(0.7311\) for donor 1, and \(0.9608\) for donor 2. The distances on the fitted-probability scale are

$$ |0.7311-0.8808|\approx 0.1497,\qquad |0.9608-0.8808|\approx 0.0800. $$

Donor 2 is nearer on the probability scale. The logistic function is increasing, so the order of the three scores is unchanged, but its changing slope compresses differences differently on opposite sides of the target. Consequently, absolute-distance rankings differ.

Choosing and Checking the Score Scale

A distance rule is meaningful only when its scale is specified. For a normal linear imputation model with identity link, the linear predictor and fitted mean are the same quantity, so those two choices do not create a scale discrepancy. Centering or standardizing those scores by a common fixed location and scale also leaves rankings unchanged. For nonlinear links, matching on the linear predictor and matching on the fitted mean are distinct procedures, even when they use the same regression fit.

Score comparisonEffect on absolute-distance rankingReason
Shift every score by the same constantPreservedThe shift cancels in each difference.
Multiply every score by the same nonzero constantPreservedEvery distance is multiplied by the same positive amount.
Apply a nonlinear inverse linkMay changeDifferences are stretched or compressed unevenly.
Use different score definitions for target and donorsNot a valid common-scale comparisonThe resulting differences do not represent one consistent score distance.

Before interpreting donor selection, check the implementation and the intended scale:

  • Confirm what is being matched. Establish whether the software or analysis uses the linear predictor, the fitted mean, or another explicitly defined score.
  • Use a common calculation. Apply the same fitted model, parameter draw, covariate coding, and score transformation to the target and donor candidates.
  • Inspect distances, not just predictions. For a few cases, calculate the target-to-donor differences directly on the stated scale. If changing a linear model’s units changes which donor is nearest, investigate a coding or implementation inconsistency.
  • Check for transformations and rounding. Rounding scores before ranking can create artificial ties or change close comparisons. Calculate using adequate precision, then round only for reporting.

A useful diagnostic is to compare rankings from both scales for a small set of cases when the inverse link is nonlinear. Disagreement is not automatically an error: it may be the expected consequence of choosing a different distance scale. It is a warning if the stated method says one scale is used but calculations or software settings implement the other.

Alternatives, Limitations, and a Common Mistake

The main alternatives in this comparison are matching on the linear predictor and matching on the fitted mean. The linear predictor is the model’s scale before applying the inverse link; the fitted mean is expressed on the outcome’s mean scale. With an identity link, these coincide. With a nonlinear inverse link, the two rules can choose different nearest candidates, as the examples show. A common affine rescaling is not a substantive alternative because it preserves the ranking; it changes distance units but not the nearest candidate.

Neither scale is guaranteed to select the best donor in every application. The score reduces each case’s predictors to one number, and cases with similar scores can still differ on important covariates or outcome-related features. The score also reflects the fitted model, so misspecification or poor prediction can undermine its usefulness. Choosing between scales requires a clear modeling and imputation rationale; it cannot be decided by the affine-invariance result alone.

Common mistake: “The inverse link is monotone, so it must preserve the nearest donor.” Monotonicity preserves the order of scores, not their absolute spacing. The corrected argument is to compare \(|T(s_j)-T(s_i)|\) across candidates: only when the transformation scales all such differences by the same positive constant is the distance ranking guaranteed to be preserved. A separate mistake is to transform donor scores but not the target score; distances must be calculated after applying the same transformation to both.

Key takeaway: A common nonzero affine transformation preserves absolute-distance donor rankings. A nonlinear transformation, including a nonlinear inverse link, can change them even if it preserves score order. Always name the score scale and calculate target and donor distances on that same scale.

Check Your Understanding

Answer each question, then compare with the solutions below.

  1. A target score is \(4\), and two donor scores are \(3\) and \(6\). If every score is standardized by subtracting \(2\) and dividing by \(4\), which donor is nearer? Show the transformed distances.
  2. A strictly increasing transformation preserves the order of a target and two donor scores. Does it necessarily preserve which donor is closest in absolute distance? Explain.
  3. For a log-link model, the target has \(\eta=1\) and donors have \(\eta=0\) and \(\eta=1.5\). Which donor is nearer on the \(\eta\) scale, and which is nearer on the fitted-mean scale?
  4. Why must the target and donor scores be computed using the same model parameters and score transformation?

Solutions. (1) The original distances are \(|3-4|=1\) and \(|6-4|=2\), so the score \(3\) is nearer. Under \(T(s)=(s-2)/4\), the target is \(0.5\), and the donor scores are \(0.25\) and \(1\). The transformed distances are \(|0.25-0.5|=0.25\) and \(|1-0.5|=0.5\); the first donor remains nearer. (2) No. A nonlinear increasing transformation can stretch and compress score differences unequally. In the logistic example above, the order is preserved but the nearest donor changes. (3) On the \(\eta\) scale, the distances are \(1\) and \(0.5\), so the donor with \(\eta=1.5\) is nearer. On the fitted-mean scale, the distances are \(|1-\exp(1)|\approx1.718\) and \(|\exp(1.5)-\exp(1)|\approx1.763\), so the donor with \(\eta=0\) is nearer. (4) A distance is interpretable as a difference between two scores only when both scores are defined on a common scale. Using different parameter values or transformations can make the comparison inconsistent with the stated matching rule.

Clinical Biostats