Documentation

13A.1 Why and when to use custom

Purpose-built commands answer predefined questions. nca calculates exposure, fit estimates a model, vpc simulates and bins, and eda produces a standard exploratory catalogue. custom answers a different question: “I already have the columns; can I make this exact view reproducibly?”

Good uses include plotting DV against IPRED for one formulation, showing ETA1 by sex, summarising observed concentration by nominal time, producing a subject-level Table 1, or inspecting a CSV written by another nlmx command. The command replaces one-off spreadsheet clicks with a recorded transformation, file inventory, and checksums.

Decision boundary

Use custom when the requested result is a plot or descriptive table of columns already present or readily derived row by row. Use a dedicated command when the task requires longitudinal derivation, likelihood estimation, simulation, uncertainty propagation, model selection, or formal inference. For example, custom can plot an existing AUC column, but it does not calculate AUC from concentration-time records. It can display prediction residuals, but it does not generate predictions from a model.

The input boundary is equally important: one file per run. There is no join, merge, wide-to-long, or long-to-wide operation. Prepare such structures upstream and preserve that preparation.

Why row grain comes first

A dataset may repeat WT and SEX on every observation. A histogram using every record weights subjects with more observations more heavily. A subject-level histogram therefore needs --distinct ID, assuming the first row is an appropriate representative. Conversely, applying distinct ID to a concentration-time plot destroys the profile. “What is one row?” must be answered separately for each item.

Choose command style from the question

Common mistakes

  • Using custom to recreate a VPC without simulation.
  • Calling a descriptive association a covariate-model result.
  • Plotting repeated baseline values as if they were independent subjects.
  • Expecting several input files to be joined automatically.

Checklist

  • Confirm the required variables already exist or need only row-wise derivation.
  • State the row grain and denominator.
  • Choose the dedicated analysis command when calculations need profiles or models.
  • Preserve the command, input hash, and output bundle.

Further reading

See input formats, data-step order, other nlmx outputs, and limits.