Documentation

20.18 Plots, GOF transformation, stratification, filtering, and publication controls

--plots writes publication PNGs; --plot-format both adds vector SVGs. Size controls are width, height, units, DPI and base font. Colors, title, legend, caption and legend position are configurable. X/Y scales can be linear/log; residual y axes remain linear around zero.

Plot controls separate data calculation from presentation

--gof-back-transform exp|exp10 transforms DV/PRED/IPRED for figures only; residuals remain fit-scale. --gof-stratify COL repeats GOF figures per level (up to documented limit). --gof-filter EXPR selects plotted observations using dataset/prediction columns before back-transformation. None changes predictions.csv or estimation.

Standard figures include DV–PRED, DV–IPRED, CWRES–TIME/PRED, IWRES–IPRED, ETA histograms against modeled normal density, and ETA pairs/correlations. LOESS is exploratory. Likelihood records are excluded from ordinary residual figures.

Use accessible redundant encodings and consistent axes across models. Archive exact plot options in command/config.

Design plots as diagnostic tests

Choose stratification from the model question: study, dose, formulation, renal group, occasion or outcome. A pooled plot can hide opposing biases. Use filters to focus a planned diagnostic, but always retain an unfiltered overview and record the exact expression. Small strata should display counts so an apparently clean panel is not overinterpreted.

--gof-back-transform must match the analysis scale (exp versus exp10). Confirm whether axes, identity lines and residuals are transformed consistently. Log axes can clarify concentration ranges but cannot display nonpositive values; account for removed points explicitly.

Publication controls—dimensions, units, DPI, format, base size, colors, titles, legends and captions—affect communication, not calculations. Preserve a review set with informative titles/captions even if a manuscript set suppresses them. Use accessible colors and inspect raster and vector output for clipping, unreadable facets and hidden overplotting.

Common mistakes

Do not back-transform residuals, use a GOF filter to claim a different fit, hide extreme points, or apply log axes to nonpositive residuals.

Checklist

  • Separate calculation and presentation.
  • State scale/back-transform/filter/strata.
  • Export reproducible vector/raster.
  • Check accessible labels/colors.
  • Compare plots with machine table.

Further reading

Chapter 21 provides detailed diagnostic interpretation; see worked FOCE-I plots.