Why the Scale of a Diagnostic Plot Matters
Concentration data often span several orders of magnitude: early or high concentrations may be much larger than late or low concentrations. On a linear axis, equal vertical distances represent equal absolute differences. On a logarithmic concentration axis, equal distances represent equal ratios. These are different visual questions, so a pattern that is prominent on one display may be faint on the other.
A second distinction is equally important: plotting concentrations on a logarithmic axis is not the same as calculating residuals after taking logarithms. The first changes the display coordinates. The second changes the quantity whose difference is calculated. Both can be useful, but they answer different questions and have different requirements.
The observed value and prediction must refer to the same observation and use the same concentration units. Before interpreting either kind of residual, also be clear about which prediction is being used, such as an individual prediction or a population-level prediction. A change in prediction target can alter the residual pattern; changing the axis does not resolve that distinction.
What Linear and Logarithmic Displays Show
On a linear concentration-versus-time plot, the vertical distance between an observation and prediction corresponds to their absolute difference. A difference of 2 concentration units is the same vertical distance whether concentrations are near 3 or near 30. This makes absolute deviations easy to compare, but a few large concentrations may dominate the visual range and compress the lower part of the profile.
On a logarithmic concentration axis, the distance between two positive values represents their ratio. For example, the distance from 1 to 2 is the same as the distance from 10 to 20, because each pair differs by a factor of 2. This can reveal relative departures over a broad concentration range, but it does not display zero or negative values. A logarithmic axis does not convert a zero concentration into a small positive concentration.
The natural logarithm is used below. Choosing a different logarithm base \(b>1\) rescales log differences by a positive constant, preserving their ordering and sign. A base \(0<b<1\), however, multiplies log differences relative to natural logarithms by a negative constant, reversing their ordering and sign. In practice, axes commonly use bases greater than 1.
Worked Example: Equal Absolute Differences on a Linear Plot
Suppose two hypothetical observations are 12 and 102 concentration units, with corresponding predictions of 10 and 100 concentration units. Calculate each raw residual and compare what the linear display emphasizes.
For the first observation, \(e_1=12-10=2\) concentration units. For the second, \(e_2=102-100=2\) concentration units. The vertical gaps on a linear concentration plot are equal. In absolute terms, both observations exceed their predictions by 2 concentration units.
The relative differences are not equal: \(2/10=0.20\), or 20%, for the first pair, and \(2/100=0.02\), or 2%, for the second. Thus the linear display represents the same absolute discrepancy in each case, even though the discrepancy is much larger relative to the first prediction. A log-based comparison would make that difference in relative size more apparent.
Log Residuals Measure Relative Discrepancy
When both \(C_i\) and \(\hat{C}_i\) are positive, subtracting their logarithms converts the comparison into a ratio. This is the basis for interpreting a log residual as a relative rather than absolute discrepancy.
Exponentiating both sides gives \(C_i/\hat{C}_i=\exp(r_i^{\log})\). Therefore the exact percent difference relative to the prediction is \(100\{\exp(r_i^{\log})-1\}\%\). A log residual of zero means observed and predicted concentrations are equal. A positive value means the observation exceeds the prediction; a negative value means it is lower. The magnitude is not itself a percent: for small log residuals, it is approximately the proportional difference, but the exact conversion uses the exponential.
Worked Example: Converting a Log Residual to a Percent Difference
For a hypothetical observation, the predicted concentration is 10 mg/L and the observed concentration is 12 mg/L. Find the raw residual, the log residual, and the exact percent difference relative to the prediction.
The raw residual is \(e=12-10=2\) mg/L. The log residual is \(r^{\log}=\ln(12)-\ln(10)=\ln(1.2)\approx0.1823\).
The exact percent difference is \(100\{\exp(0.1823)-1\}\%\approx100(1.200-1)\%=20.0\%\). Equivalently, \(100(12-10)/10=20.0\%\). The positive sign indicates that the observed concentration is 20.0% above the prediction. The log residual is dimensionless; it should not be described as \(0.1823\) mg/L or as an exact 18.23% difference.
Log residuals assign the same value to equal multiplicative discrepancies. An observation twice its prediction has log residual \(\ln(2)\), whether the pair is 2 and 1 mg/L or 20 and 10 mg/L. Conversely, equal absolute discrepancies need not produce equal log residuals. This makes log residuals useful for examining relative fit, but not a universal replacement for raw residuals.
Worked Example: Equal Ratios, Different Raw Residuals
Consider two hypothetical observation-prediction pairs in mg/L: \(C_1=2,\hat{C}_1=1\), and \(C_2=20,\hat{C}_2=10\). Compare raw and log residuals.
For the first pair, \(e_1=2-1=1\) mg/L, and \(r_1^{\log}=\ln(2/1)=\ln(2)\approx0.6931\). For the second, \(e_2=20-10=10\) mg/L, and \(r_2^{\log}=\ln(20/10)=\ln(2)\approx0.6931\).
The raw residual is ten times larger for the second pair, while both observations are exactly twice their predictions and therefore have equal log residuals. A linear residual display foregrounds absolute discrepancies; a log-residual display foregrounds multiplicative discrepancies.
Choosing and Reading a Residual Display
A practical display may put observed and predicted concentrations against time on a linear or logarithmic concentration axis, or plot residuals against time or prediction. State which quantity is transformed. For instance, plotting \(e_i\) against \(\hat{C}_i\) while using a logarithmic horizontal axis retains raw residuals vertically; it does not turn them into log residuals. Plotting \(r_i^{\log}\) against time uses a transformed residual even if the horizontal time axis is linear.
Ordinary signed residuals cannot be put directly on a logarithmic vertical axis because residuals may be zero or negative. Taking \(\ln(e_i)\) is undefined for zero and negative \(e_i\), and would discard the sign even if only positive values were retained. If residuals are to be compared on a relative scale, calculate a valid quantity such as the log ratio for positive concentrations, then plot that signed quantity on a linear vertical axis. A special signed transformation is a different diagnostic measure and must be defined explicitly; it is not an ordinary log residual.
Use paired views when both absolute and relative departures matter. Check whether conclusions depend on scale: a high-concentration observation can dominate raw residuals while low-concentration observations appear more discrepant in relative terms. Also inspect whether the displayed concentration values are positive and quantifiable before calculating logarithms. A visually smooth log-scale fit alone is not evidence that the residual structure is satisfactory.
Worked Example: Interpreting a Below-Quantification Observation
Suppose a hypothetical assay has a lower limit of quantification (LLOQ) of 0.5 mg/L. An observation is reported as below quantification (BQL), and the corresponding prediction is 0.8 mg/L. Explain what can and cannot be concluded without substituting a made-up concentration.
BQL indicates that the concentration was not quantified at or above 0.5 mg/L; it does not state that the concentration equals zero or any particular number below 0.5. Consequently, \(\ln(C_i)\) and the exact log residual cannot be calculated from the reported observation. Replacing BQL with zero would make the logarithm undefined; replacing it with, for example, 0.25 mg/L would create an unobserved value and a fabricated residual.
If the underlying concentration is nonnegative and is known only to be below 0.5 mg/L, then its raw residual relative to 0.8 mg/L lies below \(0.5-0.8=-0.3\) mg/L and is at least \(-0.8\) mg/L. This establishes a negative raw discrepancy under those stated conditions, but not its exact size. The log residual is likewise not known exactly. If the prediction were instead 0.2 mg/L, a BQL result alone would not establish whether the observation is above or below that prediction. The censoring information, not an invented point value, determines what can be inferred.
Assumptions, Diagnostics, and Limitations
A log concentration display requires positive values for every concentration shown. A log residual additionally requires a positive observed concentration and a positive prediction for every paired point. These are mathematical requirements, not optional plotting preferences. If predictions are zero or negative, investigate whether they are compatible with the concentration model and intended comparison rather than adding an arbitrary constant just to make a logarithm possible.
A below-quantification result is censored information, not an exact zero and not an exact value at the LLOQ. It should not be silently replaced by zero, LLOQ, or LLOQ/2 to create a log residual. Such substitutions can change signs and apparent patterns, especially near the quantification limit. The appropriate treatment depends on how the data and model handle censoring; a conventional residual calculation from an exact concentration is unavailable when the observation itself is not quantified.
Diagnostics should be read on the scale that matches the question. A trend in raw residuals can indicate changing absolute discrepancy; a trend in log residuals can indicate changing proportional discrepancy. Neither plot alone identifies the cause. A pattern may reflect the structural model, the residual-error specification, data limitations, or other features of the analysis. The scale helps describe what is visible; it does not establish a causal explanation.
The main alternatives are complementary rather than competing. A linear concentration or raw-residual display preserves absolute units and accommodates zero values on an ordinary linear axis. A log concentration display shows positive concentrations across broad ranges in terms of ratios, but excludes zero and negative values. A log-residual display gives signed relative comparisons for positive pairs, but depends on the selected prediction and is undefined for zero or censored observations. Presenting more than one appropriate view can expose scale-dependent features; it does not justify selecting only the view that looks most favorable.
Record whether the plotted quantity is concentration, raw residual, or log residual, and state the units where applicable.
Confirm positivity before using logarithms and identify BQL or otherwise censored observations rather than treating them as exact numbers.
Use linear differences to assess absolute departures and ratios or log residuals to assess relative departures; compare views when both matter.
Describe the observed pattern on that scale, then consider whether censoring, the prediction target, or a few large values limits interpretation.
Common Mistakes
- Confusing a log axis with log residuals. A log axis transforms display spacing; a log residual is calculated as a difference of logarithms.
- Logging a signed raw residual. Negative and zero residuals have no ordinary logarithm. Calculate a valid signed diagnostic instead of deleting negative values.
- Calling a log residual a percent. It is the natural log of an observed-to-predicted ratio. Convert it with \(100\{\exp(r^{\log})-1\}\%\) for the exact percent difference.
- Assigning BQL a convenient point value. BQL is not zero or LLOQ/2 by definition. A substituted value can produce an unsupported residual and misleading pattern.
- Assuming every log base preserves sign and ordering. Bases above 1 rescale log differences without reversing them; bases between 0 and 1 reverse their sign and ordering.
Check Your Understanding
Answer each question, then compare with the solutions below.
- An observed concentration is 6 mg/L and its prediction is 8 mg/L. What are the raw residual and log residual, and what is the exact percent difference relative to prediction?
- Why do the pairs 4 and 2 mg/L, and 40 and 20 mg/L, have equal log residuals but unequal raw residuals?
- Can a raw residual of \(-0.4\) be placed on an ordinary logarithmic vertical axis? Explain.
- A concentration is reported BQL with LLOQ 1 mg/L. Is it valid to calculate its exact log residual by treating the observation as 0 or as 1 mg/L? Why?
Solutions. (1) \(e=6-8=-2\) mg/L. The log residual is \(\ln(6/8)=\ln(0.75)\approx-0.2877\). The exact percent difference is \(100(6-8)/8=-25.0\%\), or \(100\{\exp(-0.2877)-1\}\%\approx-25.0\%\); the observation is 25.0% below prediction. (2) Both ratios are 2, so both log residuals equal \(\ln(2)\approx0.6931\). The raw residuals are \(4-2=2\) mg/L and \(40-20=20\) mg/L. (3) No. The ordinary logarithm is undefined for a negative number, and raw residuals can be signed. (4) No. Zero has no logarithm, and 1 mg/L is the LLOQ rather than the reported exact concentration. BQL supplies censoring information, not an exact value from which to calculate a log residual.