From a Transformed Model to an Interpretable Change
A regression coefficient for a transformed predictor or outcome is not always a change in the original outcome for a one-unit increase in the original predictor. Its meaning depends on which variable was transformed and on the size of the predictor change being considered. This tutorial works through four common forms: level-log, log-level, log-log, and square-root-predictor models.
The calculations below compare fitted values at two predictor values, \(x_1\) and \(x_2\), while holding any other predictors fixed. They describe model-based associations, not necessarily causal effects. For clarity, \(x\) denotes the numerical value of the predictor in the stated unit. A logarithm of \(x\) therefore requires \(x>0\); a square root requires \(x\geq 0\). A log-outcome model additionally requires positive observed outcomes.
Level-Log: A Difference from a Predictor Ratio
A level-log model keeps the outcome in its original units and uses the natural logarithm of a positive predictor. Its fitted form is
Here \(\hat{\beta}_1\) is measured in outcome units per one-unit change in \(\ln(x)\). For two predictor values, subtract the fitted values:
Thus, the fitted outcome difference depends on the ratio \(x_2/x_1\), not just the raw difference \(x_2-x_1\). The model assumes that the conditional mean of the original outcome follows a straight-line relationship with \(\ln(x)\), over the predictor range where the model is being used. The difference formula needs no assumption that the outcome itself is logged.
Worked Example: A Level-Log Model
Suppose a hypothetical fitted model predicts a laboratory measurement \(y\), in units, from a positive dose \(x\), in milligrams:
Compare the fitted outcomes at \(x_1=10\) mg and \(x_2=20\) mg. Both predictor values are positive, as required, and the calculation uses the model's stated dose unit.
The fitted difference is
The fitted measurement at 20 mg is therefore about 2.91 units higher than at 10 mg. As a check, the fitted values are \(18+4.2\ln(10)\approx27.67\) units and \(18+4.2\ln(20)\approx30.58\) units; their difference is approximately 2.91 units. This interpretation concerns fitted outcomes, not a guaranteed change for every individual.
Log-Level: A Predictor Difference Becomes an Outcome Ratio
A log-level model applies the natural logarithm to a positive outcome but leaves the predictor in its original units:
Subtracting the fitted log outcomes at \(x_1\) and \(x_2\) gives \(\hat{\beta}_1(x_2-x_1)\). Exponentiating that difference yields the ratio on the original outcome scale:
This is a ratio of exponentiated fitted log outcomes, interpreted as a ratio of fitted geometric means; with lognormal errors it is also a ratio of fitted medians. The corresponding percentage change is \(100[\exp\{\hat{\beta}_1(x_2-x_1)\}-1]\%\). Unlike the log-log model, the predictor change enters as a raw difference. The outcome must be positive for the log transformation, and the fitted relationship is assumed linear in the predictor on the log-outcome scale.
Worked Example: A Log-Level Model
In a hypothetical model, \(y\) is a positive outcome and \(x\) is temperature in degrees. The fitted relationship is
Compare \(x_1=12\) degrees with \(x_2=20\) degrees. The change is \(20-12=8\) degrees, so the fitted log-outcome difference is \(-0.035(8)=-0.280\). The ratio of exponentiated fitted log outcomes is
The fitted geometric mean at 20 degrees is about 0.7558 times the fitted geometric mean at 12 degrees. The percentage change is
So the fitted geometric mean is about 24.42% lower at 20 degrees than at 12 degrees. This is a comparison of model-based geometric means, not a claim that the arithmetic mean must fall by the same percentage. The outcome's positivity and the log-scale linear form are essential to this interpretation.
Log-Log: A Predictor Ratio Becomes an Outcome Ratio
A log-log model takes logarithms of both the positive predictor and positive outcome:
For two predictor values, the difference in fitted log outcomes is \(\hat{\beta}_1\ln(x_2/x_1)\). Exponentiating gives the exact finite-change ratio:
The coefficient \(\hat{\beta}_1\) is an elasticity: locally, a 1% increase in \(x\) corresponds to approximately a \(\hat{\beta}_1\)% change in the fitted outcome on the multiplicative scale. For a finite change, use the exact ratio formula rather than treating this approximation as exact. The predictor and outcome must both be positive, and the fitted relationship is assumed linear in their logarithms.
Worked Example: A Log-Log Model
Suppose a hypothetical model relates a positive outcome \(y\) to price \(x\), with price measured in dollars:
Compare a price of \$20 with a price of \$30. Both are positive, and the predictor ratio is \(30/20=1.5\). The fitted geometric-mean ratio is
The fitted geometric mean at \$30 is about 0.7841, or 78.41%, of its value at \$20. The percentage change is
Thus, the model implies a fitted geometric mean about 21.59% lower at \$30 than at \$20. The coefficient \(-0.60\) also gives the local elasticity interpretation: near a given price, a 1% price increase corresponds approximately to a 0.60% decrease in the fitted geometric mean. It does not mean that every finite 1% increase produces exactly a 0.60% decrease.
Square-Root Predictor: Differences in Square Roots
A square-root-predictor model leaves the outcome on its original scale and transforms a nonnegative predictor:
Subtracting fitted values gives
The fitted difference depends on the change in square roots, not the raw predictor difference. The model assumes a linear conditional mean relationship between the original outcome and \(\sqrt{x}\). It permits \(x=0\), but not negative \(x\). The coefficient's units are outcome units per square root of the predictor's stated unit.
Worked Example: A Square-Root-Predictor Model
A hypothetical fitted model predicts a measurement \(y\), in units, from duration \(x\), in hours:
Compare durations of \(x_1=4\) hours and \(x_2=9\) hours. Both are nonnegative. Their square roots are \(\sqrt{4}=2\) and \(\sqrt{9}=3\), so
Checking the fitted values gives \(6.5+1.8(2)=10.1\) units at 4 hours and \(6.5+1.8(3)=11.9\) units at 9 hours, a difference of 1.8 units. The same five-hour increase would not generally produce the same fitted change at a different starting duration, because the corresponding difference in square roots changes.
A Short Derivation and a Reliable Translation Process
All four translations follow the same basic idea: calculate the model's fitted value at each endpoint, then subtract on the scale where the model is linear. If the outcome was logged, exponentiate the log-scale difference to obtain a ratio. For example, in a log-log model,
Exponentiation turns the difference of logarithms into a ratio because \(\exp(a-b)=\exp(a)/\exp(b)\). This proves the finite-change ratio formula and explains why log-outcome models require ratio and percentage interpretations rather than direct outcome-unit differences.
For a new model, use this sequence:
Check whether the model logs the predictor, the outcome, or both, or instead uses a square-root predictor.
Logged variables must be positive; a square-root predictor must be nonnegative. Use the predictor units specified by the model.
Use the endpoint difference in logs or square roots where appropriate, rather than substituting a raw change automatically.
Keep a difference in outcome units for an unlogged outcome; exponentiate a log-outcome difference for a ratio, then state the percentage change if useful.
Common Mistakes and Why These Translations Matter
The transformations are useful because a straight-line relationship on a transformed scale can represent a curved or multiplicative pattern on the original scale. But the benefit depends on translating the fitted result correctly and stating what it describes.
- Using the coefficient as an outcome-unit change in every model. In a level-log model, the coefficient multiplies a change in \(\ln(x)\); in a log-outcome model, its effect must be exponentiated to form a ratio.
- Using a raw predictor difference when the predictor is logged. For level-log and log-log models, the relevant quantity is \(\ln(x_2/x_1)\), not \(x_2-x_1\).
- Calling a finite log-log change exactly an elasticity percentage. The coefficient is an elasticity; for a specified finite change, the exact ratio is \((x_2/x_1)^{\hat{\beta}_1}\).
- Confusing geometric means with arithmetic means. Exponentiating a fitted log outcome gives a geometric-mean interpretation (and a median under lognormal errors). It does not automatically give the arithmetic mean.
- Ignoring the transformation's domain. A logarithm cannot be applied to zero or negative values, and a square root of a real-valued predictor requires a nonnegative value.
A useful final check is to ask whether the reported quantity has the right form and units. A level-log or square-root-predictor comparison is a difference in outcome units. A comparison from a log-outcome model is naturally a ratio, often expressed as a percentage change. Always name the outcome scale and the predictor values being compared.
Check Your Understanding
For each item, identify the correct fitted-change calculation before interpreting it.
- A level-log model is \(\widehat{y}=5+3\ln(x)\). What is the fitted difference when \(x\) increases from 2 to 6?
- In a log-level model, \(\widehat{\ln(y)}=0.8+0.02x\). What ratio of exponentiated fitted log outcomes corresponds to an increase in \(x\) of 10 units?
- A log-log model has slope \(-0.4\). Write the exact fitted geometric-mean ratio for a change in \(x\) from 5 to 8, and explain why \(-0.4\) is not the exact percentage change for that finite increase.
- For \(\widehat{y}=9+2\sqrt{x}\), calculate the fitted difference between \(x=1\) and \(x=16\).
- Why is it not generally correct to describe an exponentiated fitted log outcome as the arithmetic mean of the outcome?