Documentation

20.26 Worked example: oral one-compartment FOCE-I fit

This reproducible example uses 24 subjects, one oral dose per subject, a predose observation, and eight postdose observations. The model is ADVAN2 TRANS2 with log-normal between-subject variability on clearance and volume and a combined residual-error model. The source control stream and data are preserved under documents/ch20/input/; the complete output is under documents/ch20/results/oral_focei/.

nlmx fit documents/ch20/input/run20.ctl `
  --output documents/ch20/results/oral_focei `
  --overwrite --approximation foce-i --cov-step `
  --carry-columns WT,GROUP --plots --plot-format both

The run resolved 24 subjects and 192 fitted observations. It excluded 24 pre-dose observations under the default no-drug policy and wrote them to no_drug_records.csv. Minimization reached the gradient criterion in 17 iterations and 255 objective evaluations. The OFV moved from −414.2249 to −423.6680. The final maximum gradient was 1.267e-4, below the 1.0e-3 criterion.

The estimates were CL 3.83797 L/h, V 42.6185 L, and KA 1.13156 1/h. IIV variances were 0.0552574 for CL and 0.0538213 for V, corresponding to reported CV values of about 23.8% and 23.5%. The proportional residual SD was 0.150661. The additive component approached its lower bound (5.42532e-5); that warning is scientifically important even though minimization and sandwich covariance completed. The covariance correlation-matrix condition number was 24.055 and fell to 12.408 when the near-boundary parameter was excluded.

Observed values versus population predictions from the verified FOCE-I example

The plot should be read alongside, not instead of, residual displays. Look for systematic curvature, differing dispersion by prediction magnitude, influential subjects, and observations far from the identity line.

Conditional weighted residuals versus time

What to reproduce

Run from a clean output directory, verify checksums.sha256, and compare unrounded values in fit_summary.json or CSV files. Exact wall time and log identifiers are not acceptance criteria. The numerical criteria should cover OFV, estimates, gradients, covariance status, record counts and prediction-level tolerances.

Common mistakes

  • Counting the predose rows as fitted observations.
  • Ignoring the additive-error boundary because OFV is stable.
  • Comparing rounded values copied from the listing.
  • Treating carried WT and GROUP columns as modeled covariate effects.

Checklist

  • Reproduce subject and row counts.
  • Confirm FOCE-I and sandwich covariance.
  • Reconcile the 24 excluded predose records.
  • Inspect all eight plots and the boundary note.
  • Archive control, data identity, command, log and checksums.

Further reading

See the Laplace example, predose policy, and NONMEM reproduction workflow.