Documentation

14.24 Reference-software agreement and validation design

Reproducing a major pharmacometrics package requires matching conventions before comparing numbers. “NCA” is not one universal algorithm: software can differ in duplicate handling, inserted time-zero values, trapezoid rule, partial-area interpolation, BLQ substitution, terminal candidates, weighting, tie breaking, Clast convention, and missing-result policy.

Layered NCA validation

nlmx implements familiar conventions used by tools such as Phoenix WinNonlin and Monolix—for example linear-up/log-down integration, log-linear terminal regression, and observed or predicted Clast extrapolation. Agreement is expected only when every relevant option and input interpretation is aligned. Similar output labels are not evidence that hidden defaults match.

A layered validation strategy

  1. Closed-form unit cases. Test constant, linear, and single-exponential segments whose exact AUC and AUMC are known.
  2. Algorithm cases. Freeze candidate terminal tables, tie cases, Tmax inclusion, regression weights, BLQ patterns, duplicate times, and partial boundaries.
  3. Parameter chains. Verify AUCinf, half-life, clearance, volumes, MRT, and steady-state metrics from frozen intermediate values.
  4. Cross-software fixtures. Run identical CSV data and fully specified settings in nlmx and the named reference version.
  5. Stress and failure cases. Include sparse tails, zeros, large gaps, infusion, repeated doses, and cases that must be flagged or omitted.

For each comparison, store program version, executable hash where possible, configuration, locale, inputs, raw outputs, and checksums. Use endpoint-specific absolute and relative tolerances. Near-zero values need an absolute tolerance; large quantities are often better assessed relatively. A displayed decimal mismatch may be harmless, while different selected terminal points are a categorical algorithm mismatch.

Claim boundaries

Validation should name the tested version and feature envelope. Passing oral single-dose fixtures does not validate urine NCA, sparse destructive sampling, complete bioequivalence workflows, or every reference-software option. nlmx currently targets rapid, auditable plasma concentration NCA and related comparisons; unsupported workflows should be stated rather than approximated silently.

Independent calculations in the repository reproduce configured fixtures to floating-point precision, but that evidence supports those fixtures and conventions—not universal equivalence. New features and changed defaults require new frozen cases.

Common mistakes

  • Comparing reports without freezing settings and versions.
  • Using only typical clean profiles.
  • Treating rounded equality as algorithmic equivalence.
  • Generalising one passing fixture to unsupported methods.

Checklist

  • Align inputs, conventions, versions, and precision.
  • Compare intermediate tables before final parameters.
  • Include pass, warning, omission, and error cases.
  • Store reproducible evidence and checksums.
  • Scope every accuracy claim to tested functionality.

Further reading

Use the worked closed-form example, the formula index, and Chapter 15's file-by-file output guide.