Documentation

21.14 LOESS smoothers: useful summaries with important limits

nlmx overlays a local linear LOESS trend on GOF scatter plots. The implementation uses tricube distance weights, span 0.75, and no robustness iterations, with at least five neighboring points and no line when fewer than ten finite points are available. On log axes, smoothing is performed on the plotted log scale.

LOESS helps the eye detect broad curvature or drift that is hard to see among many points. It is not a hypothesis test, confidence interval, causal model, or replacement for raw data. Its shape depends on x-density, span, outliers, boundaries, and the plotted population.

LOESS is a guide rather than a decision rule

At sparse edges, the neighborhood becomes asymmetric and the curve can bend sharply. Repeated nominal times give dense vertical bands and unequal leverage. One influential subject with many records can move the line more than a subject-level interpretation would suggest. Stratification reduces sample size and may make smoothers unstable or absent.

Read the smoother relative to the identity or zero reference, but also inspect raw points, bin-level summaries, subject traces, and counts. If a material trend appears, state its direction and range, formulate a mechanistic hypothesis, and test that hypothesis in a controlled model comparison. Do not revise a model solely to make the orange line flat.

When comparing runs, use the same rows, axes, transformation, stratification, and figure size. Otherwise apparent smoother differences can be presentation artifacts.

Common mistakes

  • Calling the LOESS line statistically significant.
  • Overinterpreting edge curvature or tiny strata.
  • Hiding raw points behind a smoother.
  • Comparing smoothers from different filters or scales.
  • Tuning the model until the line appears flat by chance.

Checklist

  • Note span, scale, sample size, and x-density.
  • Inspect raw points and reference line.
  • Check whether a few subjects drive the curve.
  • Confirm the pattern in relevant strata and summaries.
  • Test a scientific mechanism before revising the model.

Further reading

Return to DV–PRED, residual-time plots, and filtering.