Tutorials › Multiple Imputation by Chained Equations (MICE) › A Compatibility Audit for Nonlinear Regression

Imputation-Model Compatibility With the Analysis Model · Tutorial 292 of 497

A Compatibility Audit for Nonlinear Regression

Audit whether predictor imputation preserves a nonlinear regression relationship, using conditional-model reasoning and targeted checks for quadratic and spline effects.

Advanced 12 min read

What You'll Learn

  • Define compatibility between an imputation conditional and a nonlinear analysis model.
  • Derive the conditional distribution implied by a quadratic outcome regression.
  • Explain why a linear normal imputation for a predictor can miss multimodality.
  • Check whether quadratic or spline effects remain visible after imputation.
  • Distinguish compatibility checks from missingness assumptions and general diagnostics.
  • Identify the limits of audits based only on observed cases or fitted curves.

Why Nonlinear Regression Needs a Targeted Compatibility Audit

When an analysis regression allows the mean outcome to curve with a predictor, an imputation model can produce plausible-looking values while weakening or changing that curve. The audit question is not simply whether imputed values resemble observed values. It is whether the conditional imputation models can preserve the relationship specified for the analysis.

For example, suppose the planned analysis relates an outcome \(Y\) to an incomplete predictor \(X\) through both \(X\) and \(X^2\). A conditional imputation model for \(X\) that is linear and normal in \(Y\) may be convenient, but convenience does not establish compatibility. The implied conditional distribution of \(X\) can have a shape that a linear normal regression cannot represent.

This audit concerns the conditional structure of the models. It does not establish that the missingness mechanism is ignorable, that the analysis model is substantively correct, or that all other aspects of an imputation procedure are adequate. Those are separate questions.

Definition: An imputation model and an analysis model are compatible when their conditional distributions can arise from a common joint distribution for the variables involved, and that joint distribution has the analysis model as its specified outcome conditional. An audit asks whether the proposed imputation conditionals can preserve the analysis relationship, especially its nonlinear terms.

State the Analysis Model, Then Derive the Imputation Target

Let \(Z\) denote fully observed covariates. A common quadratic analysis model is

$$ Y\mid X,Z \sim N\left(\beta_0+\beta_1X+\beta_2X^2+\gamma^\mathsf{T}Z,\ \sigma^2\right). $$

This specification assumes that, conditional on \(X\) and \(Z\), the outcome has the stated mean and constant variance \(\sigma^2\), with normally distributed errors. The quadratic effect is present when \(\beta_2\ne 0\). If \(X\) is incomplete and \(Y,Z\) are observed for a case, the imputation model must represent \(X\mid Y,Z\), not just the marginal distribution of \(X\).

The conditional distribution required by a joint model follows from Bayes' rule. Writing \(p(x\mid z)\) for the conditional distribution of the predictor, the exact relationship is

$$ p(x\mid y,z)\ \propto\ p(y\mid x,z)\,p(x\mid z) \ \propto\ \exp\left\{-\frac{\left(y-\beta_0-\beta_1x-\beta_2x^2-\gamma^\mathsf{T}z\right)^2}{2\sigma^2}\right\}p(x\mid z). $$

This expression is the central audit reference. If \(\beta_2\ne0\), the squared residual contains an \(x^4\) term. Even if \(X\mid Z\) is normal, the resulting conditional distribution \(X\mid Y,Z\) is generally not a normal distribution with a mean linear in \(Y\). Depending on the values of \(Y\) and the other parameters, it can be asymmetric or have more than one mode.

A Short Derivation: Why a Quadratic Mean Can Require a Multimodal Conditional

The shape issue can be seen without fitting a complicated model. Suppose \(Z\) is absent and \(Y=10+X^2+\varepsilon\), where \(\varepsilon\sim N(0,1)\). At the outcome value \(y=14\), the squared residual is minimized when \(14=10+x^2\), which has two solutions, \(x=-2\) and \(x=2\). If the predictor distribution gives appreciable probability to both regions, then \(X\mid Y=14\) can have mass near both values.

In contrast, a single normal regression \(X\mid Y\sim N(a+bY,\tau^2)\) has one mode for each \(Y\). It cannot represent two separated modes at \(-2\) and \(2\) for the same outcome. This does not mean every quadratic model produces a visibly bimodal conditional: the predictor distribution, residual variation, and covariates all matter. It does show why a linear normal conditional is not generally guaranteed to be compatible.

Worked Example: Detecting a Two-Branch Conditional

Consider hypothetical values generated from the noiseless relationship \(Y=10+X^2\), with observed predictor values \(-2,-1,0,1,2\). Calculate the outcomes and inspect what an imputation model for \(X\) must accommodate.

Calculate the outcomes. For \(X=-2\), \(Y=10+(-2)^2=14\). For \(X=-1\), \(Y=10+1=11\). For \(X=0\), \(Y=10\). By symmetry, \(X=1\) gives \(Y=11\), and \(X=2\) gives \(Y=14\).

\(X\)\(Y=10+X^2\)
-214
-111
010
111
214

At \(Y=14\), both \(X=-2\) and \(X=2\) are consistent with the analysis relationship. A normal conditional model for \(X\mid Y\) can put its mean near zero at \(Y=14\), but a draw near zero is not equivalent to representing the two branches near \(-2\) and \(2\). If the data include noise, the branches will be less sharply separated, but the same structural concern remains.

Audit conclusion. A proposed normal linear imputation \(X\sim Y\) is not justified as compatible merely because it includes the observed outcome as a predictor. The conditional shape implied by the quadratic outcome model must also be considered.

Audit the Terms That Define the Analysis Curve

For a quadratic regression, the analysis relationship is defined jointly by its linear and squared terms. For a spline regression, it is defined by the specified basis functions and knots. A useful audit therefore follows the exact terms used in the analysis, rather than checking only whether the raw predictor and outcome are associated.

If the outcome is incomplete, its imputation conditional should represent the planned nonlinear mean structure, such as \(X\), \(X^2\), or the analysis spline basis. If the predictor is incomplete, the relevant conditional is the distribution of that predictor given the outcome and other variables; it is not generally obtained simply by reversing the outcome regression. This asymmetry is why an audit must begin with the direction of each imputation conditional.

The following checks are practical evidence, not proofs of compatibility. They should be interpreted alongside the assumed data-generating model, the missingness pattern, and the amount of information available in the observed cases.

  • Write down every analysis term, including transformations, polynomial terms, and spline basis functions.
  • For each incomplete variable, identify the conditional distribution being imputed and ask whether its form can preserve the analysis relationship.
  • Compare the nonlinear analysis curve in observed data with the same curve across completed data sets, using the same scale and covariate values.
  • Inspect residual patterns and the distribution of imputed predictors, including whether distinct regions or branches have been smoothed away.
  • Check whether conclusions about the curve depend strongly on the imputation specification, rather than treating one favorable diagnostic as decisive.

Worked Example: Auditing an Omitted Quadratic Term

Suppose a hypothetical analysis relationship is \(Y=10+X^2\), and the observed pairs are \((-2,14),(-1,11),(0,10),(1,11),(2,14)\). Compare the fitted linear and quadratic analysis curves. This checks whether a completed-data analysis that omits the quadratic term could represent the target relationship.

Fit the linear curve. The predictor mean is \(\bar{x}=0\), and the outcome mean is \(\bar{y}=(14+11+10+11+14)/5=12\). The least-squares slope is \( \sum (x_i-\bar{x})(y_i-\bar{y})/\sum (x_i-\bar{x})^2=0/10=0\), because the positive and negative predictor values cancel. The intercept is 12, so the fitted linear curve is \(\hat{Y}=12\).

The linear-model residuals, in order of \(X=-2,-1,0,1,2\), are \(2,-1,-2,-1,2\). Its residual sum of squares is \(2^2+(-1)^2+(-2)^2+(-1)^2+2^2=14\).

Fit the quadratic curve. The specified model \(\hat{Y}=10+X^2\) gives fitted values \(14,11,10,11,14\), exactly matching these hypothetical data. Its residual sum of squares is 0.

Audit conclusion. The linear fit has erased the U-shaped pattern even though its average prediction is reasonable. If imputation smooths the predictor-outcome relationship toward a single linear trend, the completed-data analysis may likewise understate curvature. A small or zero residual sum of squares in this constructed example is not evidence that real data follow the quadratic model; it only demonstrates what the omitted term fails to represent.

Check Spline Structure Around Knots

The same logic applies to a spline analysis. A spline basis can represent a change in slope or other prescribed curvature over regions of \(X\). An audit should therefore examine the fitted relationship on both sides of each knot and near the knot, where a change in shape is expected. A model that preserves a broad association but smooths over the knot-specific pattern may still distort the analysis relationship.

Worked Example: Checking a Hinge-Term Effect

Consider the hypothetical piecewise-linear mean \(Y=20+2X+3(X-5)_+\), where \((X-5)_+=\max(0,X-5)\). The knot is at \(X=5\). The term is zero at or below the knot and increases above it.

Calculate the basis term and outcome. At \(X=4\), the hinge term is 0 and \(Y=20+8=28\). At \(X=5\), it is 0 and \(Y=30\). At \(X=6\), it is 1 and \(Y=20+12+3=35\). At \(X=8\), it is 3 and \(Y=20+16+9=45\).

\(X\)\((X-5)_+\)\(Y\)
4028
5030
6135
8345

If the hinge term is omitted, the least-squares line through these four points has slope \(38.5/8.75=4.400\) and intercept \(34.5-(4.400)(5.75)=9.200\). It predicts 26.800, 31.200, 35.600, and 44.400 at the four respective \(X\) values. The residuals (observed minus fitted) are \(1.200,-1.200,-0.600,0.600\). The complete hinge model represents the specified values exactly.

Audit conclusion. The linear fit masks the knot-defined change in slope and leaves a patterned set of residuals. In an imputation audit, analogous checks should examine whether completed data retain the basis-term pattern around the knot, not merely whether their overall \(X\)-\(Y\) trend appears plausible.

Assumptions, Diagnostics, and Limits

An audit is conditional on a stated target. In the quadratic derivation, the outcome model assumes a normal conditional distribution with the displayed mean and constant variance. In the spline example, the assumed mean is the specified piecewise-linear function. If these are not defensible descriptions of the intended analysis, the audit should still preserve the chosen analysis terms while recognizing that compatibility with a model does not make that model scientifically correct.

Missingness assumptions are separate. Under a missing at random assumption, the probability of missingness may depend on observed information but not on the missing value after conditioning on that information. Such an assumption does not make incompatible conditional models compatible. Nor does a compatibility audit establish that missing at random is plausible.

Several warning signs deserve attention: completed-data curves that are flatter than observed-data curves; systematic residual patterns around a knot or across the range of \(X\); implausible concentrations of imputed values; and markedly different nonlinear coefficients under reasonable changes to the imputation specification. These are clues, not automatic diagnoses. The observed subset may be small or unrepresentative, and apparent curve differences can reflect sampling variability.

The main alternative to a simple parametric conditional is a richer conditional model capable of representing the required shape. Greater flexibility is not automatically better: sparse data can make complex models unstable, and a flexible fit may extrapolate erratically. The audit should assess whether the chosen model represents the target terms while remaining estimable and credible in the available data. Compatibility is also not the only quality criterion; valid uncertainty quantification, adequate fit, and appropriate handling of the missingness process remain necessary.

A Practical Audit Sequence

1
Specify the target.
Write the analysis conditional mean and list every nonlinear term, transformation, and knot that defines the intended relationship.
2
Identify each imputation conditional.
For every incomplete variable, state what is conditioned on and what distributional form is being used. A predictor imputation conditional is not interchangeable with the outcome regression.
3
Compare the implied shapes.
Use the joint-model identity \(p(x\mid y,z)\propto p(y\mid x,z)p(x\mid z)\) when applicable. Ask whether the proposed conditional family can represent the resulting shape.
4
Inspect the completed relationship.
Compare analysis curves, residual patterns, and imputed-value distributions across completed data sets, paying particular attention to curvature and knot regions.
5
Record what the audit cannot establish.
State limitations from sparse support, model uncertainty, and missingness assumptions; do not treat a successful diagnostic as proof of compatibility or validity.

Common Mistake

Wrong reasoning: “The imputation model includes \(Y\), so it must preserve the regression of \(Y\) on \(X\).” Including the outcome as a predictor is important, but it does not determine the conditional distribution's shape. For a quadratic mean, the implied \(X\mid Y,Z\) can be nonnormal or multimodal, while a linear normal imputation has only a single conditional mode.

Correction: Start from the exact analysis terms and derive or inspect the conditional structure required for each incomplete variable. Then check whether the proposed imputation model can represent that structure and whether completed-data diagnostics retain the target curve. Do not infer compatibility from the predictor list alone.

Key takeaway: A nonlinear analysis relationship is a structural target, not just a term to remember in the final regression. Audit each imputation conditional against that target, and treat observed-data diagnostics as evidence with limitations rather than as proof.

Check Your Understanding

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

  1. In a quadratic outcome model, why is a normal linear conditional model for an incomplete predictor not generally guaranteed to be compatible?
  2. For \(Y=7+(X-3)^2\), what two values of \(X\) correspond to \(Y=11\), and what conditional-shape issue does this illustrate?
  3. Why should a spline audit inspect the relationship around a knot rather than only compare overall correlations?
  4. Does a compatibility audit establish that the missingness mechanism is missing at random? Explain.

Solutions. (1) Bayes' rule gives \(p(x\mid y,z)\propto p(y\mid x,z)p(x\mid z)\). A quadratic mean places a squared quadratic residual in the exponent, generally producing a nonnormal conditional distribution that may have more than one mode. (2) Solve \(11=7+(X-3)^2\): \((X-3)^2=4\), so \(X=1\) or \(X=5\). The same outcome can correspond to two predictor regions, which a single-mode normal conditional may not represent. (3) A spline's basis terms allow the relationship to change shape or slope around knots; an overall association can hide a local distortion or erased change in slope. (4) No. Compatibility concerns whether the imputation and analysis conditionals can share a joint model with the specified analysis conditional. Missing at random is a separate assumption about the missingness process.

Clinical Biostats