Why Check Interactions Within Strata?
An imputation model can reproduce the overall distribution of a predictor and still weaken the interaction that the analysis is meant to estimate. The problem is that a marginal comparison averages over covariate groups. If the predictor–outcome relationship differs across those groups, averaging can hide the difference that defines the interaction.
Suppose the planned analysis relates a continuous outcome \(Y\) to a predictor \(X\), a binary covariate \(Z\), and their product. A useful diagnostic is to compare the distribution of \(X\) among observed and imputed values within joint strata of \(Y\) and \(Z\). The comparisons ask whether the imputed values retain the way \(X\) varies with \(Y\) separately for each value of \(Z\). These checks are diagnostic evidence, not a replacement for fitting the analysis model or a guarantee of valid inference.
For a continuous outcome, strata can be formed using prespecified outcome bands, or the outcome can be examined continuously with stratified plots or smooth summaries. For a categorical outcome, its observed categories can define the outcome strata directly. The covariate strata should reflect the interaction in the analysis model; for a continuous covariate, broad bands or a plot across its range may be more informative than arbitrary fine categories.
Analysis Model and the Conditional Pattern
For the basic setup, assume the planned analysis is the linear model
The conditional slope of \(Y\) with respect to \(X\) is \(\beta_X\) when \(Z=0\) and \(\beta_X+\beta_{XZ}\) when \(Z=1\). Thus, the interaction coefficient is the difference between those two slopes. If \(X\) is incomplete, an imputation model for \(X\) should preserve the information in \(Y\) and \(Z\) that is needed to retain this changing relationship. The diagnostic does not require the linear model to be true; the model states the feature that the imputation is intended to support.
A short derivation under a simple joint normal model explains why comparing \(X\) across both \(Y\) and \(Z\) is relevant. Suppose, within each value \(z\), that \(X\mid Z=z\sim N(\mu_z,\tau_z^2)\), and that
By multiplying the normal density for \(X\mid Z=z\) by the normal likelihood for \(Y\mid X,Z=z\), the terms involving \(X\) in the exponent are quadratic. Completing the square gives a conditional normal distribution with variance and mean
The conditional mean of \(X\) changes with \(Y\), and the coefficient of that change depends on the group-specific slope \(\gamma_z\). When the outcome slope differs by \(Z\), the conditional pattern of \(X\) given \(Y\) can therefore differ by \(Z\) as well. This derivation assumes normality and a simple joint model; it motivates the diagnostic but does not make normality a requirement for comparing empirical distributions.
Worked Stratified Checks
Worked Example: A Changing Outcome Pattern Across Two Covariate Groups
Consider a hypothetical dataset with continuous \(Y\), binary \(Z\), and incomplete continuous \(X\). For clarity, divide \(Y\) into low and high bands. The following cell means summarize observed \(X\) values and the imputed \(X\) values across the completed datasets:
| Covariate group | Outcome band | Observed mean of \(X\) | Imputed mean of \(X\) |
|---|---|---|---|
| \(Z=0\) | Low | 2.0 | 2.1 |
| \(Z=0\) | High | 4.0 | 3.9 |
| \(Z=1\) | Low | 1.0 | 2.8 |
| \(Z=1\) | High | 5.0 | 3.2 |
Within \(Z=0\), the observed low-to-high difference is \(4.0-2.0=2.0\) units of \(X\); the corresponding imputed difference is \(3.9-2.1=1.8\). Within \(Z=1\), the observed difference is \(5.0-1.0=4.0\), but the imputed difference is \(3.2-2.8=0.4\). The difference between the two group-specific low-to-high contrasts is \(4.0-2.0=2.0\) units for the observed values, compared with \(0.4-1.8=-1.4\) units for the imputed values.
The imputed cell means in \(Z=1\) do not retain the pronounced increase across outcome bands seen among observed values. This is a warning that the imputation may have attenuated or altered the conditional pattern relevant to the interaction. It is not proof of a defective imputation model: cell counts, within-cell variability, and the mechanism determining which \(X\) values are observed also matter.
Worked Example: Marginal Agreement Can Hide Conditional Differences
In a second hypothetical dataset, suppose the observed and imputed cell means of \(X\) are as follows. Assume the two \(Z\) groups have equal counts in each outcome band, so the marginal means are simple averages.
| Covariate group | Outcome band | Observed mean of \(X\) | Imputed mean of \(X\) |
|---|---|---|---|
| \(Z=0\) | Low | 0 | 1 |
| \(Z=1\) | Low | 4 | 3 |
| \(Z=0\) | High | 2 | 4 |
| \(Z=1\) | High | 8 | 6 |
For the low outcome band, the observed marginal mean is \((0+4)/2=2\), and the imputed marginal mean is \((1+3)/2=2\). For the high band, the observed marginal mean is \((2+8)/2=5\), and the imputed marginal mean is \((4+6)/2=5\). A comparison using only these marginal means would report exact agreement.
The stratified comparison reveals a difference. Among observed values, the low-to-high contrast is \(2-0=2\) for \(Z=0\) and \(8-4=4\) for \(Z=1\). Among imputed values, it is \(4-1=3\) for \(Z=0\) and \(6-3=3\) for \(Z=1\). The difference between group-specific contrasts is therefore \(4-2=2\) for observed values and \(3-3=0\) for imputed values. Here, exact agreement in the marginal means does not imply agreement in the conditional interaction pattern.
Worked Example: Quantifying a Within-Stratum Discrepancy
Suppose, in a hypothetical high-outcome, \(Z=1\) stratum, observed \(X\) values have mean \(12.0\) and standard deviation \(3.0\). The corresponding imputed values have mean \(10.5\) and standard deviation \(3.0\). For a simple scale-aware description, use the difference in means divided by the pooled standard deviation, assuming the two groups have equal sizes:
The imputed mean is half a pooled standard deviation below the observed mean in this stratum. The negative sign records the direction of the difference. This standardized difference is a descriptive flag, not a universal pass/fail threshold; its uncertainty and meaning depend on the cell sizes, distribution shapes, and the other strata in the interaction check.
A Practical Diagnostic Sequence
A useful check keeps the comparison tied to the analysis question while showing enough detail to expose patterns hidden by averages. The following sequence is appropriate when \(Y\) and the stratifying covariates are observed for records with missing \(X\).
Identify the predictor, outcome, and covariate terms in the planned analysis. For a continuous-by-binary interaction, write down the two group-specific outcome slopes that the analysis will compare.
Use the observed outcome categories, or carefully chosen bands for a continuous outcome, and stratify by the interacting covariate. Avoid cells so fine that they contain too few observed or imputed values to be informative.
Within each cell, compare observed \(X\) with imputed \(X\) using distributions, plots, quantiles, and summaries such as means and standard deviations. Review results across imputations rather than treating one completed dataset as definitive.
Ask whether the differences vary systematically across outcome and covariate strata in a way that weakens, reverses, or otherwise changes the interaction pattern. Check whether sparse cells or distributional outliers could explain apparent discrepancies.
Assumptions, Alternatives, and Failure Modes
These comparisons are most interpretable when the interaction-relevant covariates and outcome are observed for records with missing \(X\), the observed and imputed values can be meaningfully compared within the same strata, and there is adequate overlap: each cell needs enough observed values to serve as a useful reference. A common working assumption in missing-data analysis is that missingness is at random conditional on variables included in the imputation model. Stratified checks cannot verify that assumption. If missingness still depends on unobserved \(X\) after conditioning on observed information, observed values may not provide a representative reference for the missing values.
A table of means alone is not enough. Two distributions can have the same mean but differ in spread, skewness, or tails; those features may affect an analysis. In addition to cell summaries, inspect plots or quantiles when cell sizes allow. For continuous \(Y\), outcome bands are a simplification: results may change with band boundaries, and binning can obscure smooth changes. Use bands as a readable diagnostic, not as evidence that the outcome truly has discrete categories.
A large difference in one sparse cell can be unstable, while an overall average can hide a systematic difference across several cells. Check cell counts and the distribution of summaries across imputations. If the imputation model omits information needed to preserve an interaction, a pattern of reduced or reversed conditional contrasts may prompt model review. It does not identify one specific correction by itself.
Stratified checks complement, rather than replace, alternatives. A direct comparison of analysis-model coefficients across completed datasets addresses the fitted interaction on the analysis scale, but can be hard to interpret as a check of the conditional distributions that produced those estimates. Marginal comparisons are simpler, but can mask the group-specific pattern, as the second example showed. Predictive checks can compare broader features of the imputed distributions, while this diagnostic focuses on the conditional structure relevant to a particular interaction. None of these checks alone establishes that an imputation model is correct.
Common Mistake
A further limitation is that stratification becomes unreliable when it creates many small cells, especially when outcome bands and several covariates are crossed. In that situation, simplify the display, use plots that retain continuous information where possible, and report the limited precision honestly. Do not interpret noisy cell differences as established distortion or a good-looking summary as confirmation that none exists.
Check Your Understanding
Answer each question before reading the solutions.
- In a model with \(X\), binary \(Z\), and \(XZ\), what two group-specific slopes define the interaction?
- Why can observed and imputed marginal means agree even when the interaction-relevant conditional pattern differs?
- In one stratum, the observed mean of \(X\) is 8, the imputed mean is 7, and the pooled standard deviation is 2. What is the standardized mean difference, and what does its sign mean?
- Name one limitation of dividing a continuous outcome into bands for a stratified check.
- Does close agreement between observed and imputed distributions within the checked strata prove that the missingness assumption is correct? Explain.
Solutions. (1) The slope is \(\beta_X\) for \(Z=0\) and \(\beta_X+\beta_{XZ}\) for \(Z=1\); their difference is \(\beta_{XZ}\). (2) Marginal means average over covariate groups, so opposing or differently sized within-group patterns can cancel in the aggregate. (3) The standardized difference is \((7-8)/2=-0.500\); the imputed mean is half a pooled standard deviation lower than the observed mean in that stratum. (4) Band boundaries can change the summaries, and grouping may hide a smooth relationship within bands. (5) No. Agreement is diagnostic evidence only; it cannot establish the missingness mechanism, and unobserved values cannot be checked directly against their unknown true values.