Tutorials › Multiple Imputation by Chained Equations (MICE) › Integrated Workshop on a Derived Exposure Effect

Passive Imputation and Substantive-Model-Compatible Methods · Tutorial 332 of 497

Integrated Workshop on a Derived Exposure Effect

Build and check an imputation plan for a nonlinear exposure effect, choosing a method that keeps the imputation and analysis models aligned.

Advanced 11 min read

What You'll Learn

  • Specify a substantive model containing a nonlinear exposure effect and its derived term.
  • Distinguish recalculating a deterministic term from making the exposure imputation compatible with the analysis model.
  • Derive the SMC-FCS conditional density for an incomplete exposure.
  • Work through relative conditional-density calculations for a binary outcome model.
  • Recalculate and audit derived terms in each completed data set.
  • Identify diagnostics and failure modes that can undermine the imputation plan.

From the Analysis Model to an Imputation Plan

Suppose the scientific analysis relates an outcome \(Y\) to an exposure \(X\), but some exposure values are missing. The planned analysis includes a nonlinear exposure effect, represented by a derived term such as \(Q=(X-c)^2\), where \(c\) is a fixed centering constant. The imputation must do two things: provide plausible values for missing \(X\), and ensure that the derived term used in the analysis is calculated from the imputed \(X\). Recalculating \(Q\) solves the second problem, but does not by itself solve the first.

This workshop follows one case through model specification, method choice, imputation, and verification. The response model, the model used to impute \(X\), and the deterministic definition of \(Q\) must be considered together. In particular, an imputation model that predicts \(X\) well on average may still be unsuitable if it does not preserve the nonlinear relationship specified in the substantive analysis.

Definition: A derived term is a variable computed deterministically from one or more other variables. Here \(Q=(X-c)^2\) is derived from \(X\). Passive recalculation means calculating or updating \(Q\) from the current value of \(X\), rather than imputing \(Q\) as an independent variable. SMC-FCS means substantive-model-compatible fully conditional specification: when imputing an incomplete covariate, its conditional distribution incorporates the substantive outcome model so that the imputation is compatible with the planned analysis.

For a binary outcome, consider the substantive model

$$ \operatorname{logit}\{P(Y=1\mid X,Z)\} =\beta_0+\beta_1(X-c)+\beta_2(X-c)^2+\gamma^\mathsf{T}Z, $$

where \(Z\) denotes other covariates. The coefficient \(\beta_2\) describes curvature on the log-odds scale; it is not, by itself, a constant change in log odds for a one-unit increase in \(X\). The imputation plan needs to respect this specified outcome model when \(X\) is missing.

Assumptions and a Method Choice

The plan below assumes that the substantive model is an appropriate description of the outcome conditional on \(X\) and \(Z\), that the exposure model used for imputation is adequately specified, and that the missingness mechanism is ignorable conditional on variables included in the imputation process. In practice, the last condition is commonly expressed as missing at random given observed information, together with the usual distinctness condition for the missingness and data-model parameters. These assumptions cannot be established simply by a successful software run.

The plan also requires adequate information about the exposure distribution in the regions where values are missing. If nearly all observed exposures lie in a narrow range, a quadratic effect may be weakly identified there; extrapolating the nonlinear relationship to unsupported exposure values is risky. Include observed variables that predict missingness or exposure, as appropriate, but do not introduce a separate multilevel structure here: the observations in this workshop are treated as independent.

Passive recalculation is necessary whenever \(Q\) is used, but may not be sufficient. It guarantees that the stored \(Q\) agrees with \(X\); it does not guarantee that draws of \(X\) reflect the outcome model. SMC-FCS is appropriate when ordinary conditional imputation for \(X\) would not adequately preserve the substantive model, especially for nonlinear or non-normal outcome relationships. The earlier material on choosing passive imputation or SMC-FCS gives the general distinction; the practical question here is whether the exposure conditional used in this analysis is compatible with the quadratic effect.

Worked Example: Specify the Plan Before Imputing

Consider a hypothetical data set of 240 patients. The binary outcome is a clinical event recorded at follow-up, \(X\) is a continuous baseline exposure measured in units per day, and \(Z\) is a baseline severity score. Exposure is missing for 36 patients. The planned analysis is logistic regression with a centered linear and quadratic exposure effect, using \(c=1.5\) units per day.

Step 1: State the analysis. Set \(U=X-1.5\) and \(Q=U^2\). The analysis model is \(\operatorname{logit}\{P(Y=1\mid X,Z)\}=\beta_0+\beta_1U+\beta_2Q+\gamma Z\). The centering constant is fixed before imputation and used in every completed data set.

Step 2: Identify what is incomplete. \(X\) is incomplete; \(Y\) and \(Z\) are observed in this hypothetical example. \(U\) and \(Q\) are derived from \(X\), so they are not separately imputed.

Step 3: Choose a compatible update. Use SMC-FCS to draw each missing \(X\), with the exposure model conditional on \(Z\) and the substantive outcome likelihood conditional on \(X,Z\). After each draw, calculate \(U=X-1.5\) and \(Q=U^2\). This choice is motivated by the quadratic term in the logistic analysis; passive recalculation alone would not make an otherwise inadequate exposure imputation compatible.

Step 4: State checks in advance. Compare imputed and observed exposure distributions, inspect whether imputations extend implausibly beyond observed support, check chain behavior, and verify \(Q=(X-1.5)^2\) row by row. The missingness and model assumptions still require subject-matter assessment.

Why the SMC-FCS Conditional Includes the Outcome Model

For an incomplete exposure, the relevant conditional distribution must depend on the observed outcome as well as on predictors of exposure. A useful derivation makes the compatibility requirement explicit. Suppose an exposure model \(f_X(x\mid z)\) has been specified and the substantive outcome model gives \(f_Y(y\mid x,z)\). Under this factorization, the conditional density for \(X\), given the observed \(Y=y\) and \(Z=z\), is proportional to their product:

$$ f(x\mid y,z) =\frac{f_X(x\mid z)f_Y(y\mid x,z)} {\int f_X(t\mid z)f_Y(y\mid t,z)\,dt} \ \propto\ f_X(x\mid z)f_Y(y\mid x,z). $$

The denominator normalizes the density over possible exposure values. Since it does not depend on the candidate \(x\), it can be omitted when comparing candidate values or constructing an unnormalized sampling target. This is the key SMC-FCS adjustment: the exposure model contributes information about plausible \(X\), while the substantive likelihood contributes information about which values of \(X\) are consistent with the observed outcome under the planned analysis.

For the binary quadratic model, \(f_Y(y\mid x,z)=\pi(x,z)^y\{1-\pi(x,z)\}^{1-y}\), where \(\pi(x,z)\) is the logistic probability specified by the analysis model. Thus, apart from normalization,

$$ f(x\mid y,z)\ \propto\ f_X(x\mid z)\, \pi(x,z)^y\{1-\pi(x,z)\}^{1-y}. $$

This density is generally not a normal distribution, even when \(X\mid Z\) is modeled as normal: the logistic likelihood changes the shape, and the quadratic term makes its dependence on \(x\) nonlinear. SMC-FCS algorithms use suitable numerical methods to sample from the resulting conditional target. The model factorization and conditional distribution must be appropriate for the variables being updated; this expression is not a universal recipe for every missing-data pattern.

Worked Example: Compare Conditional-Density Weights

Use a hypothetical SMC-FCS update with \(c=1.5\), \(Z=1\), and the logistic model \(\eta=-2+0.8(X-1.5)-0.2(X-1.5)^2+0.4Z\), where \(\pi=1/(1+\exp(-\eta))\). Suppose the exposure model is \(X\mid Z=1\sim N(1.5,0.8^2)\). Compare the unnormalized conditional-density values at the candidate exposures \(x=1\) and \(x=2\).

At \(x=1\), \(U=-0.5\) and \(Q=0.25\), so \(\eta=-2+0.8(-0.5)-0.2(0.25)+0.4=-2.05\). Therefore \(\pi(1,1)=1/(1+\exp(2.05))\approx0.1140\).

At \(x=2\), \(U=0.5\) and \(Q=0.25\), so \(\eta=-2+0.8(0.5)-0.2(0.25)+0.4=-1.25\). Therefore \(\pi(2,1)=1/(1+\exp(1.25))\approx0.2227\).

The normal exposure model is symmetric about 1.5, so its density at 1 and 2 is equal. For a patient with \(Y=1\), the ratio of the unnormalized conditional density at 2 to that at 1 is \[ \frac{f(2\mid 1,1)}{f(1\mid 1,1)} =\frac{f_X(2\mid1)\pi(2,1)}{f_X(1\mid1)\pi(1,1)} =\frac{0.2227}{0.1140}\approx1.954. \] Thus the conditional target is about 1.954 times as high at \(x=2\) as at \(x=1\). For \(Y=0\), use the failure probabilities instead: \[ \frac{f(2\mid 0,1)}{f(1\mid 0,1)} =\frac{1-0.2227}{1-0.1140} =\frac{0.7773}{0.8860}\approx0.877. \] These are density ratios at two points, not probabilities that \(X\) equals either value. The calculation shows how the observed outcome modifies the exposure-model contribution.

Implement, Recalculate, and Verify

In each imputed data set, keep the exposure and its derived terms logically linked. A sound implementation draws missing \(X\) using the selected compatible conditional model, then computes \(U=X-c\) and \(Q=U^2\) from the resulting exposure values. If the software requires \(Q\) to be represented during chained updates, its deterministic update must be run after every update of \(X\), not just once at the end. Otherwise later steps can use a stale value.

The identity check is simple but essential. It tests whether the implementation has preserved the definition of the derived term; it does not test whether the imputation model, missingness assumptions, or substantive model are correct. Check the identity in every completed data set, for all rows, including those whose exposure was observed.

Worked Example: Audit the Derived Term in a Completed Data Set

A hypothetical completed data set uses \(c=1.5\) units per day and stores \(U=X-1.5\) and \(Q=U^2\). Four rows have the following exposure values: \(1.0\), \(2.2\), \(0.8\), and \(1.7\) units per day. The second value was imputed.

For \(X=1.0\), \(U=1.0-1.5=-0.5\) and \(Q=(-0.5)^2=0.25\). For \(X=2.2\), \(U=2.2-1.5=0.7\) and \(Q=(0.7)^2=0.49\). For \(X=0.8\), \(U=0.8-1.5=-0.7\) and \(Q=(-0.7)^2=0.49\). For \(X=1.7\), \(U=1.7-1.5=0.2\) and \(Q=(0.2)^2=0.04\).

Row\(X\) (units per day)\(U=X-1.5\)Correct \(Q=U^2\)Stored \(Q\)
11.0-0.50.250.25
22.20.70.490.50
30.8-0.70.490.49
41.70.20.040.04

The largest absolute discrepancy is \(|0.50-0.49|=0.01\). If values are stored to two decimal places, row 2 does not match the expected rounded value of 0.49; the derived term must be recalculated or the source of the discrepancy investigated. A practical identity check computes \(d_i=Q_i-(X_i-1.5)^2\) and verifies that each \(|d_i|\) is within a tolerance justified by numerical precision and storage rounding. Do not use a broad tolerance that could hide a stale or incorrectly defined term.

Diagnostics, Alternatives, and Limitations

Diagnostics should cover both the sampling process and the model relationship. Across chains, inspect trace plots and summaries of imputed \(X\), and compare imputed distributions with observed values conditional on relevant predictors such as \(Y\) and \(Z\). Look for implausible ranges, abrupt chain shifts, excessive concentration at boundaries, and poor overlap between observed and imputed values. With a nonlinear effect, also check whether the imputed exposures cover the regions needed to estimate curvature. These checks can reveal problems, but cannot prove that missing at random or the substantive model is correct.

The main alternative is ordinary conditional imputation for \(X\), followed by passive recalculation of \(Q\). This can be reasonable if the conditional imputation model is adequately specified and compatible with the substantive analysis. Merely including \(Y\) as a predictor, or mechanically adding a squared term to a predictor list, does not establish that compatibility. SMC-FCS explicitly incorporates the substantive likelihood in the conditional target and is often preferable when the analysis has a nonlinear term that an ordinary imputation model does not naturally preserve. Its implementation may be more computationally demanding and can depend on numerical sampling choices.

Common warning signs include treating \(Q\) as a separately imputed variable, recalculating it only once, using a different centering constant in the imputation and analysis, or assuming that an identity check validates the statistical model. Sparse data, strong nonlinearity, influential observations, and weak overlap may also make the analysis sensitive to modeling choices. If exposure values are outside plausible support, the answer is not to conceal them with a transformation: revisit the exposure model, constraints, and scientific specification. The completed-data identity is a necessary software check, not a substitute for model assessment.

Key takeaway: Specify the nonlinear analysis first, draw the incomplete exposure using a conditional model compatible with that analysis, and recompute every derived term from the current exposure. Verify the deterministic identity in every completed data set, while separately assessing the statistical assumptions and imputation diagnostics.

Check Your Understanding

Answer each question, then compare with the solutions below.

  1. If \(Q=(X-2)^2\) and an imputed exposure is \(X=3.4\), what are \(U=X-2\) and \(Q\)?
  2. In the conditional-density expression for an incomplete exposure, what two model contributions are multiplied before normalization?
  3. Why does recalculating \(Q\) not, by itself, show that draws of \(X\) are compatible with a nonlinear outcome model?
  4. For a binary outcome with fitted probability \(\pi=0.30\), what likelihood contribution does an observed \(Y=0\) make to the conditional exposure density?

Solutions. (1) \(U=3.4-2=1.4\), so \(Q=1.4^2=1.96\). (2) The exposure density \(f_X(x\mid z)\) is multiplied by the substantive outcome likelihood \(f_Y(y\mid x,z)\), then normalized. (3) Recalculation ensures only the deterministic identity \(Q=(X-c)^2\); it does not ensure that the conditional distribution used to draw \(X\) reflects the substantive outcome relationship. (4) The contribution is \(1-\pi=1-0.30=0.70\).

Clinical Biostats