42.15 Cross-software acceptance matrices
What you will learn
- Turn Chapter 40's five layers of equivalence into a matrix of fixtures with a tolerance and an origin per row.
- Choose fixtures from the package for each layer, with the independent values to expect.
- Classify every difference, and triage a mismatch in the right order.
- Work through a computed example: an OFV that differs by exactly n ln 2π.
- Handle decision margins around thresholds.
Prerequisites: Chapter 40 cross-software comparison, especially 40.2 Equivalence layers, 40.3 Why numbers differ and 40.23 A validation framework; and 42.6 Tolerance policy.
Chapter 40 argued that two tools can agree on syntax and disagree on semantics, agree on the objective and disagree on the optimum, agree on the optimum and disagree on the decision. It sketched a validation pyramid and an acceptance-matrix header. This page makes that executable. The idea is simple: every comparison you intend to claim becomes a row, and no row may be left without a stated metric, tolerance, origin and disposition.
The columns
| Column | What goes in it |
|---|---|
| Fixture ID | a stable identifier tied to a retained input hash |
| Feature | the capability tested (e.g., "OFV at fixed parameters, FOCE-I") |
| Reference product and version | the other tool and exactly how it was run |
| nlmx version | the version string and executable SHA-256 |
| Exact invariant | what must be identical (rows, subjects, doses, observations, censoring, parameter order) |
| Numeric or statistical metric | what is compared (absolute or relative difference, interval overlap, set equality) |
| Tolerance and rationale | the number and its origin (page 42.6) |
| Observed result | the raw, unrounded difference |
| Pass / fail | a mechanical comparison, not a judgement |
| Difference class | one of the dispositions below, filled for every failure |
| Issue link, reviewer, date | accountability |
The figure above shows five illustrative rows: two passes, and two failures carrying a class. Leaving the class blank on a failure is not allowed—that is how "different optimiser" becomes a catch-all explanation.
Choose fixtures by layer
The five layers of Chapter 40 map to fixtures the package already provides, with independent values you can use as the common reference for both tools.
| Layer | Question | Fixture | Independent value |
|---|---|---|---|
| 1. Syntax | Does each tool read the same file? | pop_oral1.csv |
150 subjects, 1500 observations, 72 males; mean WT 71.684, mean AGE 43.976, mean DV 1.3263 |
| 2. Semantics | Same predictions at frozen parameters? | pk_oral1_exact.csv, pop_oral1 at the generating values |
closed-form C(t); T_max 2.259 h, C_max 1.994 mg/L for the typical subject |
| 3. Objective | Same −2 log-likelihood at the same parameters? | lik_check (one ETA), lin_amt ($PRED) |
exact −2LL −144.2408; OLS OFV −148.1481 |
| 4. Numerics | Same estimates and uncertainty, within a stated tolerance? | lin_amt, pop_oral1 |
closed-form standard errors; truth with its standard errors (CL 3 %, V 2.4 %, K_A 1.3 %) |
| 5. Decision | Same conclusion? | pop_oral1 with the covariate screen; the Chapter 31 power table |
WT retained on CL and V, others rejected; N for 80 % power 43.16 → 44 |
Run layers in order. A layer-3 failure invalidates the interpretation of layer 4, so a row at layer 4 is not opened until the rows beneath it pass.
Difference classes
Every failed row gets exactly one of these (Chapter 40.23):
| Class | Meaning | Typical owner |
|---|---|---|
| Implementation defect | the program is wrong | supplier |
| Translation defect | the model or data were migrated incorrectly | analyst |
| Expected algorithmic difference | different method, same truth (e.g., FOCE-I vs SAEM) | analyst, documented |
| Insufficient precision | tolerance too tight for the numerics or the Monte Carlo error | validation lead |
| Unsupported scope | the feature is refused or absent in one tool | analyst |
| Reference issue | the reference result is itself wrong or unrepeatable | analyst, reference owner |
| Scientifically material unresolved difference | the difference could change a decision and is not yet explained | escalate |
The last class must never be closed silently. It is the one that keeps a project honest.
Triage order
Follow the order of Chapter 40.3 and stop at the first layer that explains the difference:
- Counts and exclusions — rows, subjects, doses, observations, censoring, missingness.
- Predictions at frozen parameters — at ETA = 0 and at chosen ETA vectors; for ODEs, states at event boundaries.
- Per-subject objective contributions, then the total.
- Estimates: starts, bounds, transforms, gradients, final basin.
- Uncertainty: matrix type (observed curvature, sandwich, expected information) and scale.
- Stochastic differences: estimate the Monte Carlo error before diagnosing bias.
Worked example: an OFV that differs by exactly n ln 2π
(Illustrative: the second tool's figure is constructed to show the convention; no external run is reported here.) You fit the eight-subject fixture lik_check in two tools at identical parameters. The exact marginal −2LL is −144.2408 (56 observations), the program gives −144.2408 within 0.5, but the second tool reports −41.3197. The difference is 102.9211. Triage:
- Counts. Both tools read 8 subjects and 56 observations. Layer 1 passes.
- Predictions at frozen parameters. Identical to 1e-9. Layer 2 passes.
- Per-subject contributions. The package stores the eight exact contributions. In the second tool each is larger by the same amount, 12.8651, which is seven observations × ln 2π. The offset is constant per observation, not per parameter.
The cause is a convention, not a defect: the second tool reports the full −2 log-likelihood, which includes the constant n ln(2π), while NONMEM and nlmx omit it. For 56 observations:
56 × ln(2π) = 56 × 1.837877 = 102.9211, and −144.2408 + 102.9211 = −41.3197.
The row's disposition is expected algorithmic difference (reporting convention), the tolerance is unchanged, and the matrix records the corrected metric—OFV minus n ln 2π—so that future comparisons absorb the convention without widening anything. Compare with a pure optimiser difference: that would shift the OFV without a constant offset per observation. The per-subject step is what separates the two.
A second worked case, in the same spirit: the linear-model fixture has OFV = n(ln(RSS/n) + 1) = −148.1481 with the constant omitted. A tool that includes it would report −148.1481 + 180 ln 2π = +182.7, and the matrix row would note the same convention.
Decision margins
A numerical difference matters when it crosses a threshold. (The ΔOFV pairs below are illustrative, chosen to show the geometry.) Two common thresholds are the likelihood-ratio cut-offs for one degree of freedom: 3.84 (5 %) and 6.63 (1 %).
| ΔOFV, nlmx | ΔOFV, other tool | Difference | Decision (3.84) | Verdict |
|---|---|---|---|---|
| 152.0 | 151.6 | 0.4 | include / include | fine: far from the threshold |
| 4.10 | 3.60 | 0.5 | include / exclude | material: the difference crosses the threshold |
| 3.80 | 3.90 | 0.1 | exclude / include | material: a difference of 0.1 flips the decision |
The same absolute difference, 0.4–0.5, is trivial in the first row and decisive in the second. So the matrix needs a decision-margin column: for every row with a threshold, the distance of the result from the threshold, and a rule that rows inside a stated margin (say ±1 OFV unit) are re-run with more precision or with a second tool before a conclusion is drawn.
For stochastic rows, the margin is the Monte Carlo uncertainty. A Chapter 31 SSE estimate of power 0.833 with a 95 % Wilson interval of 0.436–0.970 cannot be compared with a reference power of 0.80 at any useful margin: the row's disposition is insufficient precision until the replicates are increased (page 42.11).
A template
Keep the matrix as a table you can sort and hash. A CSV header that follows the columns above:
fixture_id,feature,reference_product,reference_version,nlmx_version,nlmx_sha256,exact_invariant,metric,tolerance,tolerance_origin,observed,pass,difference_class,decision_margin,issue,reviewer,date
One row per comparison; one file per project phase; the file's SHA-256 recorded in the validation summary. For a migration from one of the tools of Chapter 40 (NONMEM, PsN, PopED or Monolix), start from the matching migration page and ask, for each feature you rely on, which row of this matrix will prove it.
What a cross-software matrix cannot say
- It cannot say one tool is "better". A row passes or fails against a stated reference at a stated tolerance.
- It cannot extend beyond its fixtures. A pass on a one-compartment oral model says nothing about a three-compartment ODE model with lag.
- It cannot replace model qualification on your data (page 42.1).
Review checklist
- Does every row have a fixture hash, a metric, a tolerance with an origin and a disposition when it fails?
- Were the layers opened in order?
- For a mismatched OFV, was the per-subject comparison done before the optimiser was blamed?
- Is there a decision-margin column wherever a threshold decides something?
Navigation
See the previous page, the next page and the complete validation reference.