Tutorials › Regression Analysis (Undergraduate) › Comparing Transformed Models on the Outcome Scale

Transforming Predictors and Outcomes · Tutorial 415 of 991

Comparing Transformed Models on the Outcome Scale

Learn to put predictions from transformed-outcome models on a common, interpretable scale before comparing their fitted effects.

Intermediate 9 min read

What You'll Learn

  • Distinguish transformed-scale coefficients from effects measured in the original outcome units.
  • Compare fitted predictions at the same predictor values and for the same prediction target.
  • Translate log-outcome predictions to arithmetic-mean predictions using a smearing estimate when appropriate.
  • Calculate and interpret outcome-scale contrasts between predictor values.
  • Account for residual variation when translating predictions from a square-root outcome model.
  • Recognize why comparing raw coefficients from differently transformed models is misleading.

Why Put Competing Models on the Outcome Scale?

A transformed-outcome model may fit a relationship well while producing coefficients that are difficult to interpret in the units people care about. A slope of 0.12 on a log scale, for example, is not a change of 0.12 outcome units. Nor can that number be directly compared with a slope of 3.0 from a model fitted to the untransformed outcome. The coefficients describe changes on different scales.

To compare what models imply, choose the same predictor values and the same prediction target, then translate each model’s predictions to the original outcome scale. This makes the comparisons interpretable in context: predicted points, minutes, dollars, or other original units. The translation must respect what each model estimates. In particular, exponentiating a fitted log outcome does not generally give the arithmetic mean outcome.

Definition: An outcome-scale comparison expresses fitted predictions or contrasts from candidate models in the original units of the response variable \(Y\). A contrast is a specified difference between predictions, such as the predicted change in \(Y\) when \(x\) increases from \(x_1\) to \(x_2\). Comparisons are meaningful only when they refer to the same outcome, predictor values, and prediction target.

What Each Model Predicts

For a direct linear model, write \(Y_i=\beta_0+\beta_1x_i+\varepsilon_i\). The model assumes that the conditional mean of \(Y_i\) is \(\beta_0+\beta_1x_i\), so the fitted prediction \(\hat{y}(x)=\hat{\beta}_0+\hat{\beta}_1x\) is in the original units of \(Y\). The error has conditional mean zero, \(E(\varepsilon_i\mid x_i)=0\). For the usual least-squares calculations, observations are treated as independent; constant conditional error variance is needed for the usual standard-error formulas, though not for calculating the fitted line itself.

For a log-outcome model, the response must be positive, and the model is \(\log(Y_i)=\gamma_0+\gamma_1x_i+U_i\). It assumes a linear conditional mean on the log scale and, for the usual interpretation of the fitted log value, \(E(U_i\mid x_i)=0\). Exponentiating the fitted log value gives \(\exp(\hat{\gamma}_0+\hat{\gamma}_1x)\), which is a prediction on the original scale but is not generally the arithmetic conditional mean. Indeed,

$$ E(Y\mid x)=\exp(\gamma_0+\gamma_1x)\,E\{\exp(U)\mid x\}. $$

The second factor accounts for residual variation. A common estimate is the smearing factor \(S=\frac{1}{n}\sum_{i=1}^{n}\exp(\hat{u}_i)\), where \(\hat{u}_i\) are fitted residuals on the log scale. The arithmetic-mean prediction is then estimated by \(S\exp(\hat{\gamma}_0+\hat{\gamma}_1x)\) when the residual distribution, and therefore the smearing factor, is reasonably stable across the predictor values being considered. If residual variation changes with \(x\), one common factor may not be suitable.

A square-root outcome model requires a different translation. Suppose \(Z_i=\sqrt{Y_i}=\delta_0+\delta_1x_i+e_i\), with \(Y_i\geq 0\), \(E(e_i\mid x_i)=0\), and conditional variance \(\operatorname{Var}(e_i\mid x_i)=\sigma_e^2(x_i)\). Since \(Y_i=Z_i^2\), its arithmetic conditional mean is

$$ E(Y\mid x)=\{\delta_0+\delta_1x\}^2+\sigma_e^2(x). $$

This follows by expanding the square: if \(m(x)=\delta_0+\delta_1x\), then \(E\{(m(x)+e)^2\mid x\}=m(x)^2+2m(x)E(e\mid x)+E(e^2\mid x)=m(x)^2+\sigma_e^2(x)\). Thus, simply squaring the fitted square-root value omits the contribution of residual variation when the target is the arithmetic mean.

Worked Predictions and Contrasts

Worked Example: Comparing a Direct Model With a Log Model

Suppose two fitted models describe a hypothetical outcome measured in points, using a predictor \(x\) measured in hours. The direct model is \(\hat{y}_A(x)=20+3x\). The log-outcome model is \(\widehat{\log(Y)}=3.4+0.12x\), and its training residuals give a smearing factor \(S=1.081\). Assume residual checks support the direct model’s linear mean pattern and do not show a strong change in its error spread. For the log model, assume the log-scale relationship is adequate and the residual distribution is sufficiently stable across the \(x\) values used here for one smearing factor to be reasonable. Compare arithmetic-mean predictions at \(x=6\).

The direct model predicts

$$ \hat{y}_A(6)=20+3(6)=38.0\text{ points}. $$

For the log model, first calculate the fitted log value:

$$ 3.4+0.12(6)=4.12. $$

Exponentiation gives \(\exp(4.12)\) on the outcome scale, but the target here is the arithmetic mean. Apply the smearing factor:

$$ \hat{E}(Y\mid x=6)=1.081\exp(4.12)\approx66.5455\approx66.5\text{ points}. $$

At this predictor value, the log model’s estimated arithmetic mean is about 28.5 points higher than the direct model’s prediction: \(66.5-38.0=28.5\) points. This is a comparison of fitted predictions, not evidence that changing \(x\) causes an outcome change. The two models also imply different fitted relationships, so the comparison should be considered alongside model diagnostics and prediction performance.

Worked Example: Comparing an Effect Over the Same Predictor Change

Use the two hypothetical models above to compare predictions when \(x\) increases from 2 to 6 hours. For the direct model,

$$ \hat{y}_A(2)=20+3(2)=26.0,\qquad \hat{y}_A(6)=20+3(6)=38.0. $$

Its fitted contrast is \(38.0-26.0=12.0\) points over this four-hour increase.

For the log model, the arithmetic-mean predictions, using the same \(S=1.081\), are

$$ \hat{E}(Y\mid x=2)=1.081\exp(3.4+0.12(2)) =1.081\exp(3.64)\approx41.2\text{ points}, $$

and

$$ \hat{E}(Y\mid x=6)=1.081\exp(4.12)\approx66.5\text{ points}. $$

The log model’s fitted arithmetic-mean contrast is therefore about \(66.5-41.2=25.3\) points, with minor variation in the final decimal depending on rounding the predictions. Its ratio of predictions is also informative: because the same smearing factor applies at both values,

$$ \frac{\hat{E}(Y\mid x=6)}{\hat{E}(Y\mid x=2)} =\exp\{0.12(6-2)\}=\exp(0.48)\approx1.616. $$

Under this fitted model, the arithmetic-mean prediction at 6 hours is about 1.62 times the prediction at 2 hours, or about 62% higher. The direct model instead describes a fixed increase of 12.0 points over the same change. Both the difference and the ratio are expressed using predictions on the original outcome scale; neither conclusion comes from directly comparing the slopes 3 and 0.12.

Worked Example: Translating a Square-Root Model

A hypothetical nonnegative outcome is measured in points. Suppose a fitted model is \(\widehat{\sqrt{Y}}=4.0+0.30x\), and the conditional residual variance on the square-root scale is estimated as \(0.25\) across the relevant predictor range. Assume the square-root-scale mean pattern is adequate, residuals have mean zero, and the constant variance estimate is appropriate here. Find the estimated arithmetic mean of \(Y\) at \(x=2\) and \(x=6\), then calculate the contrast.

At \(x=2\), the fitted square-root value is \(4.0+0.30(2)=4.6\). The arithmetic-mean prediction includes the residual-variance contribution:

$$ \hat{E}(Y\mid x=2)=4.6^2+0.25=21.16+0.25=21.41\text{ points}. $$

At \(x=6\), the fitted square-root value is \(4.0+0.30(6)=5.8\), so

$$ \hat{E}(Y\mid x=6)=5.8^2+0.25=33.64+0.25=33.89\text{ points}. $$

The estimated arithmetic-mean contrast is \(33.89-21.41=12.48\) points. Squaring the fitted square-root values without adding \(0.25\) would give predictions of 21.16 and 33.64 points. Those are smaller than the arithmetic-mean predictions under the stated model, because they leave out the conditional residual variance.

Why Raw Coefficients Are Not Comparable

A coefficient’s numerical size depends on the scale on which the model was fitted. In the direct model above, the slope 3 means that the fitted conditional mean changes by 3 outcome points per additional hour. In the log model, the slope 0.12 is a change in fitted log outcome per hour. For a one-hour increase, exponentiation corresponds to a multiplicative factor of \(\exp(0.12)\approx1.127\) in the model’s outcome-scale predictions when the same smearing factor applies. This is about a 12.7% increase, not an increase of 0.12 points. In the square-root model, the slope 0.30 is measured in square-root points per hour and does not represent a constant change in the original outcome units.

Even coefficients fitted to the same kind of transformed outcome can be hard to compare if the predictor units differ or the predictor change differs. A useful comparison states the predictor values explicitly, translates the relevant predictions to the original outcome scale, and reports an outcome-scale difference or ratio in context. A difference answers “how many outcome units?” A ratio answers “how many times as large?” These are distinct summaries and may tell different parts of the story.

The comparison also depends on the prediction target. A back-transformed log location and an arithmetic conditional mean are not interchangeable. Before comparing models, state whether the target is, for example, a conditional mean or a median, and use a suitable translation for each model. If the smearing factor varies across \(x\), use an appropriate \(x\)-specific estimate or avoid presenting a single-factor correction as an arithmetic-mean estimate.

How to Make a Fair Comparison

1
Specify the target.
Name the outcome, its original units, and whether the comparison concerns a mean, median, or another prediction target.
2
Choose common predictor values.
Evaluate every candidate model at the same values of \(x\), preferably within the range supported by the observed data.
3
Translate each fitted result correctly.
Use the appropriate back-transformation and account for residual variation when estimating an arithmetic mean.
4
Report an interpretable contrast.
Give predicted values and a difference or ratio, with units and context. Do not compare transformed-scale slopes as if they had the same units.
5
Check the model conditions.
Consider whether the fitted mean pattern and residual behavior support the translations used, especially whether a common smearing factor or residual variance is reasonable.

Common Mistakes

  • Comparing slope magnitudes across scales. Saying a slope of 3 is larger than a slope of 0.12 ignores that the coefficients have different units and interpretations. Compare outcome-scale predictions or contrasts instead.
  • Exponentiating and calling the result an arithmetic mean. Exponentiating a fitted log value does not generally account for residual variation. Use a suitable smearing adjustment when the target is the arithmetic mean.
  • Comparing different targets. A median-like prediction from one model and an arithmetic-mean prediction from another do not form a like-for-like comparison. Identify the target before calculating predictions.
  • Leaving out units or predictor values. “The effect is 12” is incomplete. State, for example, that the fitted mean increases by 12.0 points as the predictor rises from 2 to 6 hours under the stated model.
  • Interpreting fitted contrasts causally. A regression contrast describes model-based association unless the study design and assumptions support a causal interpretation.
Key takeaway: Different outcome transformations create coefficients on different scales. Compare models by translating predictions for a common target and common predictor values back to the original outcome units, then interpreting differences or ratios in context.

Check Your Understanding

Answer each question using the ideas in this tutorial.

  1. A log-outcome model has slope \(0.08\) per unit of \(x\). Why is it incorrect to describe this as an increase of 0.08 outcome units?
  2. A log model’s exponentiated fitted value is 50 units and its appropriate smearing factor is 1.10. What is the estimated arithmetic-mean prediction?
  3. For a log-outcome model with a common smearing factor, explain why the factor cancels when taking the ratio of predictions at two predictor values.
  4. A square-root outcome model has a fitted square-root value of 3.0 and conditional residual variance 0.16. Under the assumptions in this tutorial, what is the estimated arithmetic mean of the outcome?
  5. Name two items that should be held common or explicitly specified when comparing fitted predictions from different outcome models.