Documentation

20.1 The role of fit in the workflow

fit converts a specified population model into estimated parameters, uncertainty and diagnostic quantities. It sits after data/control-stream QC and often after autoinit or screen. Its output feeds covariate modeling, forest plots, VPC, simulation, exposure-response and power workflows.

A fit is a traceable pipeline

The command does not choose a scientific model automatically. It estimates the control stream it is given. Model structure, event coding, error equation, random effects, bounds and method all determine the likelihood. A numerically successful fit of a wrong specification remains wrong.

The correct unit of archival is the entire output directory. EXT alone contains estimates/history but not the resolved command, data interpretation, prediction rows, warnings, plots or checksums. Downstream commands can read the run family directly when files remain together.

For exploratory work, skip covariance to iterate quickly but preserve output and label the run exploratory. For a candidate final fit, require reproducible convergence, covariance or justified alternative uncertainty, diagnostics and validation against the intended software/reference.

What fit does—and does not decide

fit parses the model and data, constructs the population objective, estimates requested parameters, optionally calculates uncertainty, and writes review artifacts. It cannot decide whether the structural assumptions are clinically reasonable, whether sampling supports all estimated effects, or whether the analysis question requires a different estimand. Those remain pharmacometric decisions.

Before fitting, define the intended population, observation policy, units, structural model, random-effects structure, residual likelihood, approximation, and acceptance criteria. After fitting, separate four judgments: execution correctness, numerical convergence, uncertainty reliability, and scientific adequacy. Each can pass or fail independently. For example, a run can converge numerically while producing a boundary variance, biased residual pattern, or implausible clearance.

In a regulated or decision-critical workflow, preserve the exact input control stream and dataset, resolved command, software version, logs, final control stream, machine-readable results, plots and checksums. This package lets another analyst reconstruct not just the answer but the route to it.

Common mistakes

Do not begin fitting before QC, use fit as a structural search without prespecified comparisons, or overwrite previous evidence. Avoid changing several model and numerical features simultaneously when recovering a failed run.

Checklist

  • Freeze input data/control stream and checksums.
  • State model purpose and estimation method.
  • Use an isolated output directory.
  • Review complete termination and warnings.
  • Carry the bundle into downstream work.

Further reading

Start with your first fit, then Chapters 11–12, 16–19 for prerequisites.