Documentation

21.11 Residuals versus time: finding missing dynamics

Residuals versus time are primarily a test of temporal structure. In a correctly specified dynamic model, the conditional expectation of a suitable residual should remain near zero across time. Patterns can identify absorption, distribution, elimination, turnover, delay, tolerance, occasion, or time-varying covariate behavior not represented adequately.

Interpret the shape in pharmacometric terms. Positive early residuals mean observations exceed predictions, possibly indicating faster input or an unmodeled loading component. Alternating positive and negative trends around the peak can indicate an incorrect absorption model. Positive late residuals suggest underpredicted terminal concentrations, potentially requiring an additional compartment, slower elimination, or corrected dose history. Periodic patterns may reflect dosing intervals or occasions.

Residual time trends are diagnostic signatures

Time can mean nominal time, elapsed time, time after dose, or study time. The standard plot uses the available TIME value; for repeated-dose studies, a custom time-after-dose or occasion view may be more informative. Carry or derive the necessary columns in a traceable preprocessing step.

Dense scheduled sampling creates vertical bands. A LOESS curve can be dominated by common early times, so inspect bin counts and sparse terminal regions. Stratify by dose, route, formulation, study, occasion, and DVID when those factors could change dynamics. Maintain comparable axes and report observation counts.

The Chapter 20 example contains one dose and rich sampling at shared times, making its vertical structure expected. The relevant question is whether the conditional center departs systematically from zero across those times.

Common mistakes

  • Treating scheduled vertical bands as duplicate records.
  • Using clock time when time after dose is the scientific axis.
  • Ignoring sparse late-time behavior.
  • Pooling routes or occasions with different dynamics.
  • Interpreting LOESS edge behavior without raw points.

Checklist

  • Define the time variable and dose-relative context.
  • Review early, peak, distribution, and terminal phases.
  • Stratify by design factors and endpoint.
  • Inspect counts and subject coverage across time.
  • Translate patterns into a specific testable mechanism.

Further reading

See residuals versus prediction, stratification, and individual profiles.