Why the Response Scale Changes a Residual
A PD residual is a discrepancy between an observed response and a model prediction, but its meaning depends on the scale on which the model describes that response. A difference of 5 response units may be informative for one outcome, while a proportional difference is more natural for another. This distinction matters especially when responses are modeled after a logarithmic transformation or are bounded, as with percentages.
For clarity, let \(y_i\) be the observed response for observation \(i\), and let \(\hat y_i\) be its fitted value on the original response scale. Define the raw residual as observed minus predicted. If a model is fitted to \(\log(y_i)\), it also has a residual on the log scale. These are not interchangeable: one is an additive discrepancy in original units, and the other represents a multiplicative discrepancy after exponentiation.
The logarithmic scale is useful when relative rather than absolute differences are central, or when positive responses vary proportionally. A log residual of 0.10 does not mean the response is 0.10 units above prediction. It means the observed-to-predicted ratio on the modeled log scale is \(\exp(0.10)\), about 1.105. Thus, the observed response is about 10.5% above the prediction represented by \(\exp(\hat\eta_i)\).
Log-Scale Residuals and Original-Scale Predictions
Suppose a positive PD response follows a lognormal observation model conditional on the model predictors:
Here \(\eta_i\) is the predicted mean of the log response, and the model assumes errors are centered at zero on the log scale with constant variance \(\sigma^2\), conditional on the predictors. The distributional assumption also implies positive responses and a lognormal response distribution on the original scale. Residual diagnostics should therefore ask whether discrepancies are reasonably described on the log scale, not only whether original-scale differences look small.
Exponentiating \(\eta_i\) gives the conditional median of \(Y_i\), not its conditional arithmetic mean. Because exponentiation is nonlinear, the positive and negative log-scale deviations do not cancel symmetrically on the original scale. Under the stated normal-error model, the arithmetic mean includes a variance correction.
The correction follows directly from the normal moment-generating function. Write \(Y_i=\exp(\eta_i)\exp(\epsilon_i)\). For a normal random variable with mean zero and variance \(\sigma^2\), \(E[\exp(\epsilon_i)]=\exp(\sigma^2/2)\). Therefore:
This result explains a common source of apparent bias. If the scientific target is the arithmetic mean response but predictions are calculated only as \(\exp(\hat\eta_i)\), those predictions are systematically below the model-implied mean when residual variance is positive. Conversely, if the target is the typical response or conditional median, \(\exp(\hat\eta_i)\) is the relevant prediction. The prediction target must be specified before judging bias.
Worked Example: Reading a Log-Scale Residual
Suppose a hypothetical positive PD response is observed as \(6.00\) units. The fitted log response is \(\hat\eta=1.50\). Interpret the log-scale and original-scale discrepancies, treating \(\exp(\hat\eta)\) as the fitted median.
Log residual. The observed log response is \(\log(6.00)=1.7918\). Thus,
The positive sign means the observation is above the fitted value on the log scale. Exponentiating the residual gives the ratio:
Thus, the observed response is about 1.339 times the fitted median, or approximately 33.9% higher. On the original scale, the fitted median is \(\exp(1.50)\approx 4.482\) units, so the raw residual relative to that median is \(6.00-4.482=1.518\) units. The log residual describes a ratio; the raw residual describes an additive difference.
Worked Example: Correcting a Back-Transformed Mean
In a hypothetical lognormal PD model, a prediction has \(\hat\eta=1.50\), and the residual variance on the log scale is \(\sigma^2=0.16\). Find the fitted median and arithmetic mean on the response scale.
Median. Exponentiating the fitted log response gives:
Arithmetic mean. The variance correction is \(\sigma^2/2=0.16/2=0.08\), so:
The fitted mean exceeds the fitted median by about \(4.855-4.482=0.373\) units. If the target is the arithmetic mean, reporting \(4.482\) units as that mean would underpredict it by about 0.373 units because it omits the retransformation correction. If the target is the median, \(4.482\) units is appropriate.
Residuals for Percentages and Other Bounded Responses
A percentage response is bounded. If recorded on a 0-to-100 scale, it can first be expressed as a proportion \(p=y/100\), which lies from 0 to 1. A raw residual in percentage units is easy to communicate: an observed response of 72% and a prediction of 65% differ by 7 percentage points. This does not mean the response is 7% higher; relative to 65%, the difference is about 10.8%.
Raw percentage-point residuals retain an intuitive interpretation but do not by themselves account for the response distribution or its variance. For example, a model may predict a proportion near zero or one, where the response has less room to vary in one direction than near the middle of the range. If a model uses a link function, residuals may also be calculated on the link scale. For the logit link, \(\operatorname{logit}(p)=\log(p/(1-p))\); a link-scale discrepancy is a difference in log odds, not percentage points.
The appropriate probability model depends on how the percentage was generated. If it is a count of successes out of a known number of trials, a binomial model can use both the proportion and its denominator. If it is a continuous proportion, another bounded-response model may be appropriate. A beta model, for example, is commonly defined for values strictly between zero and one; exact zeros and ones require a model that can represent those boundary values or a justified alternative treatment. The residual definition and its expected variability should match the chosen model.
Worked Example: Comparing Percentage-Point and Logit Residuals
A hypothetical model predicts a PD response of 65%, and the observed response is 72%. Calculate the raw residual in percentage points and the difference on the logit scale. Assume both proportions are strictly between zero and one.
Raw residual. Using observed minus predicted, \(72\%-65\%=+7\) percentage points. This says the observation exceeds the prediction by 7 percentage points.
Logit-scale difference. Convert the percentages to proportions: \(p_{\mathrm{obs}}=0.72\) and \(\hat p=0.65\). Then:
The positive link-scale residual means the observed log odds exceed the predicted log odds. Exponentiating gives an odds ratio of \(\exp(0.3254)\approx1.385\), so the observed odds are about 38.5% greater than the predicted odds. This is not a 38.5-percentage-point difference. The raw and link-scale residuals answer different questions and have different units.
Choosing and Checking the Residual Scale
A residual plot is informative only when its scale is understood. For a log-transformed response, a plot of log residuals against fitted log responses assesses whether the model’s conditional log-scale structure is plausible. Persistent positive residuals at high fitted values, for example, may indicate systematic underprediction on that scale. A plot of raw residuals against fitted original-scale predictions instead emphasizes absolute errors; a similar-looking pattern can have a different interpretation.
For bounded responses, inspect whether residuals are constrained or asymmetric near the boundaries, and whether their spread changes with the predicted proportion. A raw residual near a predicted value of 0.95 cannot extend upward as far as downward, while at 0.50 there is more room in either direction. A funnel or changing spread in raw residuals may therefore reflect the bounded scale, a misspecified variance model, or both. It is not automatically evidence that the mean model is wrong.
A link-scale residual can reduce some scale-related asymmetry, but it does not make every model assumption true. In particular, the difference between observed and fitted logits is not automatically a standardized residual: its expected variance depends on the response model and, for binomial data, on the trial count. For discrete or strongly non-Gaussian responses, simple residual plots may not have the familiar interpretation of residuals from a continuous normal-error model. Diagnostics should be interpreted with the assumed likelihood and sampling structure in view.
Determine whether the model describes the original response, its logarithm, or a transformed mean such as a logit-linked proportion.
For a lognormal model, distinguish the conditional median from the arithmetic mean before comparing predictions with observations.
State whether a discrepancy is in response units, percentage points, log units, or log odds; do not compare those quantities as if they were interchangeable.
Look for boundary accumulation, changing spread, or systematic patterns, and assess them against the response distribution and model assumptions.
Common Mistakes and Limitations
- Calling a log residual an additive response error. A log residual of 0.20 is in log units. It corresponds to a multiplicative ratio of \(\exp(0.20)\), about 1.221, rather than an increase of 0.20 original units.
- Exponentiating a fitted log mean and calling it the arithmetic mean. Under normal log errors, \(\exp(\eta)\) is the median. The arithmetic mean is \(\exp(\eta+\sigma^2/2)\).
- Calling a percentage-point difference a percent difference. A change from 65% to 72% is 7 percentage points, or about 10.8% relative to 65%; these phrases describe different quantities.
- Taking the logit of a boundary value without a model for it. The logit is undefined at 0 and 1. Adding an arbitrary small constant does not resolve the modeling issue and can change residuals substantially.
- Assuming a transformed scale fixes misspecification. A transformation changes residual interpretation and may better represent variance, but does not guarantee a correct mean model, independence structure, or error distribution.
Compared with raw residuals, transformed-scale residuals may better express proportional error or align with the fitted likelihood, but they are less directly interpretable in clinical response units. Back-transformed predictions restore those units, yet their meaning depends on whether the target is a median, mean, or another summary. For bounded responses, percentage-point residuals are clinically transparent, whereas link-scale residuals respect the model’s predictor scale but are less intuitive. Neither scale is universally preferable; report the scale and prediction target explicitly.
These diagnostics also have limits. A few large residuals do not by themselves identify the cause of a problem, and a visually pattern-free plot cannot prove that the model is correct. Log transformation excludes nonpositive observations unless the scientific measurement model provides a defensible alternative. Bounded outcomes require attention to how endpoints arise and to whether the model’s variance and support match the data. Residual interpretation is one component of model assessment, not a substitute for understanding the observation process.
Check Your Understanding
Answer each question, then compare your reasoning with the solutions.
- A log-scale residual is \(-0.15\). Is the observation above or below the prediction, and what is the observed-to-predicted ratio on the log-model scale?
- Under a lognormal model with \(\eta=0.80\) and \(\sigma^2=0.25\), calculate the conditional median and arithmetic mean.
- An observed response is 41% and the prediction is 38%. State the raw residual with its units. Is it 3% higher?
- Why can a logit-scale residual not be directly interpreted as a percentage-point residual?
- What should be considered before calculating a logit residual for an observation recorded as exactly 0%?
Solutions. (1) The observation is below the prediction because the residual is negative. The ratio is \(\exp(-0.15)\approx0.8607\), so the observation is about 86.1% of the prediction, or about 13.9% lower. (2) The median is \(\exp(0.80)\approx2.226\) response units. The mean is \(\exp(0.80+0.25/2)=\exp(0.925)\approx2.522\) units. (3) The raw residual is \(41\%-38\%=+3\) percentage points. It is not 3% higher: relative to 38%, the increase is \(3/38\approx7.9\%\). (4) A logit residual is a difference in log odds, while a percentage-point residual is a difference between proportions multiplied by 100; the scales are nonlinear and have different units. (5) The logit is undefined at zero. First determine whether zero is a genuine boundary outcome, a rounded or censored measurement, or a value requiring a model that explicitly accommodates zeros; do not add an arbitrary constant without justification.