40.2 Five layers of equivalence
What you will learn
- Test syntax, semantics, objective, numerics, and decision separately
- Know which failures invalidate downstream comparisons
- Build a traceable equivalence claim
Prerequisites: Chapter 39 troubleshooting, Chapter 36 command reference, and Chapter 38 output reference.
This page is scoped to nlmx 4.16.2 and an external-documentation snapshot of 2026-11-10. Product names describe different system boundaries; a blank or “outside role” is not a quality ranking. Treat every migration as a new implementation until model semantics, analysis population, objective definition, numerical behavior, outputs, and decisions have been independently reconciled.
Five layers must align. Syntax asks whether both systems can read an equivalent representation. Semantics asks whether records, events, covariates, variability, censoring, and population mean the same thing. Objective asks whether the likelihood/approximation/constants and analyzed observations match. Numerics asks how equations, integration, modes, optimization, stochastic draws, and derivatives are computed. Decision asks whether selection, convergence, QC, or model-ranking rules match.
Syntax is the weakest layer. nlmx reads a supported subset of NM-TRAN, but a parsed control stream may still use a record that is refused or ignored. A translated Mlxtran or PopED R function can draw the same curve while using different variance parameterization. Similar output column names do not establish identical residuals.
Test layers in order. First compare record/event counts and sentinel predictions with fixed parameters and ETAs. Next compare per-subject and total objective at frozen parameters, including excluded observations. Then compare gradients/modes or likelihood precision. Only then compare optimized estimates and covariance. Finally reproduce the workflow decision: retained relationship, recommended model, power threshold, or design.
Write claims narrowly: “For fixture F, nlmx 4.16.2 and NONMEM 7.5.x produced FOCE-I OFVs within T and parameter estimates within U after aligning predose handling” is auditable. “nlmx is NONMEM-compatible” is not.
A practical worksheet
Create five rows labeled syntax, semantics, objective, numerics, and decision. For each, write the artifact that proves agreement. Examples are a successful parser/translation report; a row/event reconciliation; an evaluation-only OFV table; a gradient, profile, or Monte Carlo comparison; and the final selected-model path. Mark a layer not tested, never implicitly green. If semantic equivalence fails, stop: optimizer and runtime comparisons downstream no longer answer the same question.
Review checklist
- Are the exact product versions, task boundaries, inputs, methods, and settings named?
- Were semantics and frozen-parameter results aligned before optimized outputs?
- Is the comparison using a method-appropriate deterministic or stochastic tolerance?
- Are unsupported or analogous features described without implying equivalence?
- Can every claim be reproduced from retained primary evidence?
Navigation
See the previous page, next page, and complete comparison reference.