13A.12 Smooth methods, bands, and interpretation
The smooth geom provides a descriptive trend through numeric x and y. --smooth-method loess is the default; lm fits a straight linear relationship. The embedded loess uses local linear regressions with tricube weights over the nearest --span fraction of points and requires at least ten observations. It is not identical to R's default local quadratic loess.
--span controls flexibility. A smaller span follows local variation and noise; a larger span produces a broader trend. The default is 0.75. --smooth-level sets the confidence-band level, default 0.95, and --no-smooth-se removes the band.
What the band means
The band reflects uncertainty in the fitted descriptive trend under its calculation assumptions. It is not a prediction interval for new subjects, not a confidence interval from a population PK model, and not evidence of causality. Repeated observations from the same subject are not automatically modelled as correlated; a narrow band can therefore overstate independent information.
The observed-versus-IPRED example layers raw points and a smooth with an identity line. Departure from identity suggests a pattern to investigate, but IPRED was itself generated from a model in real workflows, so the plot is diagnostic rather than an independent validation.
For a novice review, compare the smooth with a binned table or a simple linear fit and inspect whether a handful of extreme x values control the curve. Repeat the plot by important strata only when each panel has enough observations. A smoother is most useful for generating a focused follow-up question, not for choosing a covariate equation by eye.
Common mistakes
- Comparing the curve exactly with R without matching algorithms.
- Treating repeated observations as independent inferential evidence.
- Choosing span after seeing a desired pattern and not documenting it.
- Calling the smooth band a prediction interval.
Checklist
- Record method, span, and band level.
- Show raw observations where feasible.
- Consider subject-level dependence.
- Test whether the visual conclusion survives reasonable spans.
- Use a modelling command for inferential relationships.
Further reading
See plot grammar, diagnostic worked example, validation limits, and Chapter 13's smoother guidance.