Why Transform a Continuous Imputation Target?
A continuous variable can be strongly right-skewed even when its relationship with predictors is reasonably simple. For example, a positive biomarker may increase multiplicatively with age or treatment group: differences between groups are better described as ratios than as constant additive shifts. A normal linear model fitted directly to such values can predict negative values and may leave a skewed, uneven residual pattern.
A monotone transformation can make the conditional relationship more nearly linear and the conditional residual distribution more nearly normal. In MICE, the transformation changes the scale on which the conditional model is fitted; it does not change the target variable. The missing values must ultimately be returned to the variable's original scale, and each predictive draw must be transformed back separately.
The main example is the natural logarithm, \(Z=\log(Y)\), which requires \(Y>0\). In practice, the numerical values are logged in a fixed measurement unit, and exponentiating returns values in that same unit. Other choices include the square-root transformation for nonnegative values and a Box–Cox transformation for positive values. The choice should reflect the variable's support and the conditional data pattern, not merely an attempt to make a histogram of all observed values look normal.
Model and Assumptions
For a positive target, a common specification is a normal linear regression for the transformed value:
Here \(\boldsymbol{x}_i\) contains the predictors used in the conditional imputation model. The specification assumes that, conditional on those predictors, the transformed mean has the stated linear form and the residual variance is constant; the normal residual assumption supplies the predictive distribution. The observed positive target values are logged when fitting the model. During a MICE update, model parameters and residual uncertainty are drawn according to the continuous-model procedure, producing a predictive draw on the log scale. The inverse transformation is then applied to that draw.
These are conditional assumptions. The marginal distribution of \(\log(Y)\) need not be normal: it may be a mixture across predictor values. Nor does a transformation itself justify the missingness assumptions underlying the analysis. It cannot repair omitted predictors, an unsuitable conditional relationship, or a missingness mechanism that is not adequately addressed by the analysis.
A log transformation is not defined for zero or negative values. Adding a constant before logging changes the model and its interpretation, and should not be done automatically. If the variable has a structural mass at zero, or has a genuine upper or lower bound, that feature calls for a model suited to that support; do not use a log transformation to disguise it.
Back-Transformation and Interpretation
For a continuous, strictly increasing transformation \(g\), conditional quantiles map back directly whenever the relevant quantile of \(Y\) lies in the domain of \(g\). If \(Z=g(Y)\), then the \(p\)-quantile of \(Y\) is the inverse transformation of the \(p\)-quantile of \(Z\). In particular, under the log model, the conditional median of \(Y\) is the exponential of the conditional mean of \(\log(Y)\). This does not generally equal the conditional arithmetic mean of \(Y\).
For a log-normal conditional distribution, if \(\log(Y)\mid\boldsymbol{x}\sim N(\mu_{\log},\sigma^2)\), the median is \(\exp(\mu_{\log})\), while the mean is \(\exp(\mu_{\log}+\sigma^2/2)\). The variance term matters: exponentiating only the fitted log-scale mean gives the median, not the arithmetic mean. In imputation, one should retain the predictive uncertainty in the draws and transform each draw back, rather than replacing the distribution of possible missing values by one back-transformed fitted value.
The quantile relation follows directly from monotonicity. For an increasing \(g\), the event \(Y\le y\) is equivalent to \(g(Y)\le g(y)\). Therefore:
Thus, for a continuous, strictly increasing \(g\), the lower conditional quantiles satisfy \(q_Z(p\mid\boldsymbol{x})=g(q_Y(p\mid\boldsymbol{x}))\), provided \(q_Y(p\mid\boldsymbol{x})\) lies in the domain of \(g\); applying \(g^{-1}\) gives the stated relation. This follows because \(g\) preserves order, so it maps the lower-quantile cutoff for \(Y\) to that for \(Z\). A central interval can therefore be formed by transforming its two endpoints. The interval is generally asymmetric on the original scale even when it is symmetric on the transformed scale.
Worked Example: Interpreting a Log-Scale Predictive Distribution
Suppose a hypothetical missing positive measurement, recorded in units, has the predictive model \(\log(Y)\mid\boldsymbol{x}\sim N(\log(10),0.5^2)\). The model is conditional on the included predictors; assume for this illustration that the log-scale mean and residual variance are appropriate for that predictor pattern.
The conditional median on the original scale is \(\exp(\log(10))=10\) units. The central 90% interval on the log scale is \(\log(10)\pm1.64485(0.5)\). Since \(1.64485(0.5)=0.822425\), its endpoints after back-transformation are:
This is a central 90% predictive interval under the stated conditional model, not an interval for an unknown population parameter. Its asymmetry around 10 units is expected: the original-scale distribution is log-normal, with a longer upper tail. The conditional arithmetic mean is \(\exp(\log(10)+0.5^2/2)=10\exp(0.125)\approx11.33\) units, which exceeds the median.
Making and Checking the Imputation
A transformation-based MICE update follows the same chained structure as a continuous regression update, with an additional scale conversion. The transformation applies to the target values used to fit that conditional model. Other variables in the imputation system remain part of the predictor set as specified for the analysis.
Confirm that the observed values lie within the transformation's domain. For a log model, every value used in the target must be positive.
Apply \(g\) to the observed values of \(Y\), then fit the conditional model for \(Z=g(Y)\) using the chosen predictors.
For each missing target value, obtain a predictive draw for \(Z\), retaining parameter and residual uncertainty as required by the continuous imputation procedure.
Set the imputed value to \(g^{-1}(Z)\). Store that value as the completed-data value of \(Y\), not as a transformed-scale value.
Diagnostics should assess the conditional model on the scale on which it is fitted and the consequences on the scale on which the variable is used. Examine residual patterns for curvature, unequal spread, and influential observations; assess whether residual normality is plausible enough for the intended predictive use. Also inspect back-transformed imputations for implausibly small or large values and compare their distribution with observed values at similar predictor patterns. A transformed marginal histogram alone is not a sufficient diagnostic.
Worked Example: Drawing and Back-Transforming a Missing Value
Consider hypothetical positive assay values \(Y\), measured in units, with the model \(\log(Y_i)=0.50+0.20X_i+\varepsilon_i\). Suppose the observed values are positive, the transformed conditional relationship is adequately linear over the relevant \(X\) range, and residual spread is roughly constant. For one missing case, \(X=5\). A predictive draw using the parameter draw for this iteration gives a residual draw of \(-0.10\).
The log-scale fitted component is \(0.50+0.20(5)=1.50\). Adding the residual draw gives \(\log(Y_{\mathrm{mis}})=1.50-0.10=1.40\). Back-transforming the draw gives:
This value is one stochastic imputation, not the conditional mean or a uniquely determined prediction. A different parameter or residual draw can produce a different positive value. Positivity follows from the inverse log transformation, but positivity alone does not establish that the imputation is plausible; the value must also be assessed against the measurement context and predictor pattern.
Choice of Transformation and Main Alternatives
A log transformation is useful when positive values vary multiplicatively, the conditional spread grows with the level, or a log-scale model gives a more adequate conditional distribution. A square-root transformation can be considered for nonnegative values when it reduces curvature or uneven spread, but it cannot solve a point mass at zero by itself. A Box–Cox transformation offers a family of power transformations for positive values; the transformation and its inverse must be applied consistently. Any data-driven choice should be made within the modeling workflow and scrutinized for stability, rather than treated as a guarantee that assumptions hold.
| Approach | Potential advantage | Important limitation |
|---|---|---|
| Normal model on the original scale | Direct interpretation in the variable's units; no inverse transformation | Can give implausible negative draws or poorly modeled skew and spread |
| Normal model after transformation | Can represent positive skew and multiplicative patterns while ensuring positive draws under a log model | Requires a valid transformation domain and adequate conditional fit; back-transformed draws can be highly skewed |
| Predictive mean matching (PMM) | Can draw values resembling observed target values without assuming normal residuals on a transformed scale | Depends on suitable donor matches and may not represent values beyond the observed donor range |
These approaches are alternatives, not universal fixes. A transformation does not ensure compatibility among all the conditional models in an FCS system, and it does not ensure that transformed residuals meet the model assumptions. Conversely, skewness in the marginal outcome does not by itself require a transformation if the original-scale conditional model is adequate.
Worked Example: Why Each Draw Must Be Back-Transformed
Suppose two hypothetical log-scale draws for a missing positive value are \(\log(4)\) and \(\log(16)\), with equal weight. Back-transforming each draw produces 4 and 16 units. Their arithmetic average on the original scale is \((4+16)/2=10\) units.
Averaging the log draws first gives \((\log(4)+\log(16))/2=\log(8)\); exponentiating gives 8 units. That is the geometric mean of the two values, not their arithmetic mean. It is not a substitute for retaining the two imputations. Each completed data set should contain the original-scale draw associated with its own MICE iteration, and subsequent analyses should use those completed data sets under the usual multiple-imputation combining procedure.
This calculation illustrates a general rule: nonlinear inverse transformations do not commute with averaging. Transforming a pooled or averaged transformed-scale quantity can change its interpretation and discard between-imputation variation.
Common Mistakes and Limitations
- Using a log model with zero values. The logarithm is undefined at zero. Do not silently add an arbitrary constant; decide whether the variable's data-generating structure calls for a different model.
- Exponentiating only a fitted log-scale value. This gives a transformed location, often the conditional median under a log-normal model, not a predictive draw. Imputation must include uncertainty.
- Calling the exponentiated log mean the arithmetic mean. Under log-normality, the arithmetic mean includes the variance adjustment \(\exp(\sigma^2/2)\); the exponentiated log mean is the median.
- Checking only whether imputations are positive. A log model guarantees positive values, but can still generate implausible values if the conditional model or its predictors are poor.
- Assuming a normal-looking transformed histogram proves model adequacy. The relevant assumptions concern the conditional model and its residual behavior, not simply the marginal target distribution.
A transformation changes the scale of the model and the meaning of its coefficients. For example, a difference in conditional log means corresponds to a ratio of conditional medians after exponentiation, not an additive difference in units. It can also amplify the effect of upper-tail draws when returned to the original scale. The transformation should therefore be justified by conditional diagnostics and by the scientific interpretation required on the original scale.
Check Your Understanding
Answer each question before reading its solution.
- A log-scale conditional model has mean \(\log(6)\) and standard deviation \(0.4\). What is the conditional median of \(Y\)?
- For the model in question 1, calculate the conditional arithmetic mean under log-normality.
- Why should a log transformation not be applied directly to a target containing zero values?
- Two equally weighted original-scale imputation draws are 9 and 25 units. Compare their arithmetic mean with the exponential of their average log value.
Solutions. (1) The median is \(\exp(\log(6))=6\) units. (2) The mean is \(\exp(\log(6)+0.4^2/2)=6\exp(0.08)\approx6.500\) units. (3) Since \(\log(0)\) is undefined, the stated transformation and inverse procedure do not apply to zero without changing the model; an arbitrary offset is not automatically justified. (4) The arithmetic mean is \((9+25)/2=17\) units. The exponential of the average log is \(\exp((\log(9)+\log(25))/2)=\sqrt{225}=15\) units, the geometric mean; it is not the arithmetic mean and does not replace keeping each draw separately.