Complete validation and testing reference
This page is generated from the validation package's own data files:
testcases.json(118 tests),requirements.csv(90 requirements),risk_register.csv(42 risks) and the tools README. It lists; it does not interpret. For the reasoning behind any row, follow the links to the chapter's pages.
Contents: 1 Tests by section · 2 Risk register · 3 Requirements · 4 Check types and keys · 5 Independent calculators · 6 Reference data · 7 Exit codes and fixtures · 8 Numbers at a glance
1 Tests by section
IQ — Installation qualification (8 tests)
Evidence that the program is installed correctly, is the intended release and works on the computer used for validation.
| Test | Title | Risk | Requirements | Checks |
|---|---|---|---|---|
| IQ-001 | Identification of the installed program | High | URS-GEN-001, URS-SYS-001 | 4 |
| IQ-002 | Command inventory | Medium | URS-GEN-002, URS-SYS-001 | 23 |
| IQ-003 | Executable integrity (SHA-256) | High | URS-SYS-001, URS-DI-009 | 2 |
| IQ-004 | Licence | Medium | URS-GEN-007 | 3 |
| IQ-005 | Write access and a complete project | Medium | URS-SYS-001, URS-GENR-001 | 5 |
| IQ-006 | Graphics and document output on this platform | Low | URS-SYS-002 | 6 |
| IQ-007 | Threads | Low | URS-SYS-001, URS-DI-005 | 3 |
| IQ-008 | Package integrity and supplier evidence | Medium | URS-SYS-001 | 3 |
- IQ-001 — Confirm that the executable under test is the intended release and that it identifies itself consistently.
- IQ-002 — Confirm that every documented command is present in the installed program.
- IQ-003 — Establish that the installed executable is bit-identical to the released/accepted one.
- IQ-004 — Confirm that the licence is displayed together with the installed version.
- IQ-005 — Confirm that the account can write files and that the numerical core, the dataset writer and the estimator work end to end on this computer.
- IQ-006 — Confirm that plots and Word/PDF documents can be written on this platform (fonts, graphics libraries).
- IQ-007 — Confirm that worker threads can be started and give identical results.
- IQ-008 — Show that the test definitions and reference data used are the approved, unchanged ones, and that the supplier documentation is on file.
OQ-GEN — General behaviour of the command-line program (9 tests)
Help, exit codes, settings files, logging options and listings common to all commands.
| Test | Title | Risk | Requirements | Checks |
|---|---|---|---|---|
| OQ-GEN-001 | Built-in help of every command | Low | URS-GEN-002 | 23 |
| OQ-GEN-002 | Invalid usage is rejected (exit code 2) | Medium | URS-GEN-002, URS-GEN-003 | 5 |
| OQ-GEN-003 | Failures end with the documented exit code and a hint | High | URS-GEN-003, URS-GEN-009, URS-GEN-006 | 10 |
| OQ-GEN-004 | Settings templates (--print-config) are written and accepted | Medium | URS-GEN-006 | 17 |
| OQ-GEN-005 | Listings of checks and plots (--list-checks, --list-plots) | Low | URS-QCD-001, URS-QCN-001, URS-EDA-001 | 6 |
| OQ-GEN-006 | Logging options | Low | URS-GEN-008, URS-DI-001 | 9 |
| OQ-GEN-007 | Configuration reference (schema) | Low | URS-GEN-010 | 3 |
| OQ-GEN-008 | Help of a command lists the options of that command only; the full list is on request | Low | URS-GEN-011 | 5 |
| OQ-GEN-009 | A value outside the documented range of an option is refused before anything is written | Low | URS-GEN-011, URS-GEN-002 | 2 |
- OQ-GEN-001 — Every command answers --help with its usage.
- OQ-GEN-002 — Incorrect usage never produces results.
- OQ-GEN-003 — Every failure class ends with its documented exit code and an explanation.
- OQ-GEN-004 — Every command with a settings file can write its annotated template, and the template is a valid settings file.
- OQ-GEN-005 — The documented number of checks is what the program runs.
- OQ-GEN-006 — Logging options do what they say; the transcript is always written.
- OQ-GEN-007 — The configuration reference is available.
- OQ-GEN-008 —
nlmx <command> --helpandnlmx help <command>describe one command;nlmx --helplists every option of every command. - OQ-GEN-009 —
--retryaccepts 0 to 10; 11 is a usage error (exit code 2) and no output folder is created.
OQ-ASK — ask: language-model assistant (5 tests)
Guardrails tested with a scripted mock model.
| Test | Title | Risk | Requirements | Checks |
|---|---|---|---|---|
| OQ-ASK-001 | Assistant guardrails: every forbidden command is refused | High | URS-ASK-001 | 11 |
| OQ-ASK-002 | Assistant runs a permitted command inside its session folder with a complete record | High | URS-ASK-001, URS-DI-001 | 10 |
| OQ-ASK-003 | No language model reachable: exit code 3 with a hint | Low | URS-ASK-002, URS-GEN-003 | 3 |
| OQ-ASK-004 | Real language model: plain-language request (manual) | Low | URS-ASK-001 | 2 |
| OQ-ASK-005 | Assistant guardrails: a settings file or control stream that points outside the permitted folders is refused | High | URS-ASK-003, URS-ASK-001 | 7 |
- OQ-ASK-001 — A scripted (mock) model proposes five commands that each break one guardrail; none may run.
- OQ-ASK-002 — The permitted command runs into a numbered folder inside the session folder; the session is fully recorded.
- OQ-ASK-003 — With a model server address where nothing listens the assistant fails cleanly.
- OQ-ASK-004 — Real models are not deterministic, so the behaviour is assessed by the tester (the guardrails themselves are tested automatically in OQ-ASK-001/002).
- OQ-ASK-005 — A permitted command can still read a file outside the folder if its settings file or control stream names one. The assistant reads these references and refuses the command (the reference must be to an existing file, which the test creates beside the working folder); a command that stays inside the folder runs.
OQ-INI — autoinit: initial estimates from the data alone (2 tests)
Closeness to truth and reproducibility.
| Test | Title | Risk | Requirements | Checks |
|---|---|---|---|---|
| OQ-INI-001 | Initial estimates close to the generating values | Medium | URS-INI-001, URS-DI-002 | 9 |
| OQ-INI-002 | Autoinit is reproducible with the seed | Medium | URS-DI-004, URS-DI-007 | 1 |
- OQ-INI-001 — Starting values from the data alone are close to the truth that generated it.
- OQ-INI-002 — The machine-learning step is controlled by the seed.
OQ-COV — cov: covariate analysis engines (5 tests)
Four engines on data with known covariate effects.
| Test | Title | Risk | Requirements | Checks |
|---|---|---|---|---|
| OQ-COV-001 | Frozen-model covariate screen retains the true effects and rejects the others | High | URS-COV-001, URS-DI-002 | 26 |
| OQ-COV-002 | Stepwise (scm) engine | High | URS-COV-002 | 17 |
| OQ-COV-003 | Posterior-stability and combined engines | High | URS-COV-002 | 25 |
| OQ-COV-004 | The covariate analysis records its inputs | Medium | URS-COV-003, URS-DI-003 | 4 |
| OQ-COV-005 | The stepwise search gives the same final model as an explicit fit of that model | High | URS-COV-004 | 4 |
- OQ-COV-001 — The dataset was simulated with weight on CL (exponent 0.75) and on V (exponent 1.0) and no other covariate effect; AGE, SEX, EGFR and the pure-noise covariate NOISE are not in the generating model.
- OQ-COV-002 — The stepwise forward/backward engine refits the model at each step.
- OQ-COV-003 — The posterior-stability engine (seeded; 200 complementary-pair replicates) and the combined run recover the true effects and reject the noise.
- OQ-COV-004 — input_manifest.json lists every input with its SHA-256; recomputing the hashes finds no difference.
- OQ-COV-005 — The covariate model chosen by the stepwise search (WT on CL and on V, power form) is a reparametrisation of the model fitted explicitly with $PK equations: the objective function value of the final refit and the two exponents must agree with an explicit fit, whatever the reference value of the covariate.
OQ-CUS — custom: plots and tables of any dataset (3 tests)
Table statistics against an independent calculation; filter and mutate; plot formats.
| Test | Title | Risk | Requirements | Checks |
|---|---|---|---|---|
| OQ-CUS-001 | Summary table statistics | Medium | URS-CUS-001 | 10 |
| OQ-CUS-002 | Filter and mutate before tabulating; frequency table | Medium | URS-CUS-002, URS-CUS-001 | 6 |
| OQ-CUS-003 | Plots: boxplot, histogram and scatter, PNG and SVG | Low | URS-CUS-001 | 8 |
- OQ-CUS-001 — Table statistics (shown to 3 significant digits) equal the independent calculation.
- OQ-CUS-002 — Data steps (filter, mutate, distinct) are applied before the statistics.
- OQ-CUS-003 — Plots of the requested kinds are written in the requested formats.
OQ-EDA — eda: exploratory data analysis (3 tests)
Standard outputs, statistics against an independent calculation, --mutate, visual review.
| Test | Title | Risk | Requirements | Checks |
|---|---|---|---|---|
| OQ-EDA-001 | Standard tables, plots and report with correct counts and statistics | Medium | URS-EDA-001, URS-DI-002 | 14 |
| OQ-EDA-002 | --mutate creates a derived column used by the tables | Low | URS-EDA-002 | 2 |
| OQ-EDA-003 | Visual review of the exploratory plots (manual) | Low | URS-EDA-001 | 2 |
- OQ-EDA-001 — The standard EDA outputs are produced for the reference dataset and the statistics equal an independent calculation.
- OQ-EDA-002 — A derived column is available to the analysis.
- OQ-EDA-003 — A person reviews the graphics (the automated checks cannot judge a picture).
OQ-ER — er: exposure-response analysis (8 tests)
Five response types against known generating parameters.
| Test | Title | Risk | Requirements | Checks |
|---|---|---|---|---|
| OQ-ER-001 | Continuous response: Emax model recovers the generating parameters | High | URS-ER-001 | 9 |
| OQ-ER-002 | Binary response: logistic regression against an independent fit | High | URS-ER-001 | 5 |
| OQ-ER-003 | Count response: Poisson regression with exposure-time offset against an independent fit | High | URS-ER-001 | 4 |
| OQ-ER-004 | Time-to-event: Cox proportional hazards recovers the log hazard ratio | High | URS-ER-001 | 6 |
| OQ-ER-005 | Ordinal response: proportional-odds slope | Medium | URS-ER-001 | 4 |
| OQ-ER-006 | Longitudinal summaries | Low | URS-ER-002 | 6 |
| OQ-ER-007 | Time-to-event exposure-response: Cox model, Kaplan-Meier median and log-rank test equal an independent computation | High | URS-ER-003 | 5 |
| OQ-ER-008 | Longitudinal exposure-response with central = "median": medians and distribution-free intervals equal an independent computation | Medium | URS-ER-004 | 3 |
- OQ-ER-001 — 1000 subjects simulated with E0 5, Emax -20, EC50 60, SD 3 (independent generator, seeded).
- OQ-ER-002 — The coefficients equal those of an independent logistic regression of the same data (2e-3) and recover the generating values.
- OQ-ER-003 — As for the binary response with a log(follow-up time) offset.
- OQ-ER-004 — 1000 subjects with exponential event times (baseline log rate -4.6, log HR per AUC -0.012), censored administratively.
- OQ-ER-005 — Ordinal (4 grades) data simulated with a common slope.
- OQ-ER-006 — Change-from-baseline slopes per visit are written.
- OQ-ER-007 — From 1000 subjects (813 events) the Cox coefficient (Breslow partial likelihood, Newton-Raphson), log-likelihood, AIC, BIC (penalty ln(events)), the Kaplan-Meier median of the placebo group and the log-rank chi-square are recomputed from the data.
- OQ-ER-008 — With central = "median" each group and visit shows the median and the interval [y(j), y(n+1-j)] from the order statistics (binomial coverage at least 95 %; the range when n < 6). All cells are recomputed.
OQ-FIT — fit: population model estimation (14 tests)
Accuracy against truth and against independent calculations, outputs, methods, solver equivalence, covariates and options.
| Test | Title | Risk | Requirements | Checks |
|---|---|---|---|---|
| OQ-FIT-001 | Parameter recovery on the reference population (FOCE-I) | High | URS-FIT-001, URS-DI-002 | 9 |
| OQ-FIT-002 | Objective function against an independent marginal likelihood | High | URS-FIT-002 | 3 |
| OQ-FIT-003 | Individual predictions against an independent model calculation | High | URS-FIT-003 | 3 |
| OQ-FIT-004 | Output files and formats | Medium | URS-FIT-004, URS-DI-002, URS-DI-003 | 26 |
| OQ-FIT-005 | Estimation methods FO, FOCE, FOCE-I, Laplace and SAEM | Medium | URS-FIT-005, URS-FIT-001 | 22 |
| OQ-FIT-006 | Analytic ADVAN, linear $DES (matrix exponential) and general ODE give the same objective function | High | URS-FIT-006 | 6 |
| OQ-FIT-007 | Covariate effects in $PK are estimated without bias | High | URS-FIT-007, URS-FIT-001 | 7 |
| OQ-FIT-008 | Fit options | Low | URS-FIT-008, URS-DI-003 | 5 |
| OQ-FIT-009 | $OMEGA and $SIGMA SAME blocks tie the estimates; malformed SAME blocks are refused | High | URS-FIT-009, URS-GEN-009 | 7 |
| OQ-FIT-010 | Event data items that must be whole numbers are refused when they are not | High | URS-FIT-010, URS-GEN-003 | 6 |
| OQ-FIT-011 | A $PRED model that uses AMT as an ordinary data item reproduces the least-squares solution | High | URS-FIT-011, URS-FIT-002 | 9 |
| OQ-FIT-012 | Standard errors of a linear model equal the closed-form values (exact information matrix) | High | URS-FIT-012 | 6 |
| OQ-FIT-013 | fit --ctls fits several control streams in turn; one failure does not stop the others | Medium | URS-FIT-013 | 13 |
| OQ-FIT-014 | A parameter the model never uses is flagged and does not spoil the other standard errors | Medium | URS-FIT-014 | 7 |
- OQ-FIT-001 — The estimates recover the values that generated the data within statistical error (SE of CL 3 %, V 2.4 %, KA 1.3 %); the weight effect is deliberately not modelled so the variances are inflated.
- OQ-FIT-002 — The exact -2 log marginal likelihood of 8 individuals is computed by direct numerical integration over ETA(1) (independent of nlmx, 4001-point trapezoid to +-8 SD; the nlog(2pi) constant is omitted as in nlmx and NONMEM). FOCE-I and Laplace approximate it; as OMEGA shrinks the Laplace OFV converges to it.
- OQ-FIT-003 — IPRED of every observation is recomputed from the closed-form one-compartment oral solution using the final estimates and each individual's ETAs (and, for the covariate model, the individual's weight).
- OQ-FIT-004 — All documented NONMEM-format outputs are written and complete.
- OQ-FIT-005 — All five methods converge and recover the fixed effects; FO is the least accurate and is given a wider tolerance.
- OQ-FIT-006 — The same model is written three ways: ADVAN2 (closed form), a linear $DES (solved by matrix exponential) and a $DES made non-linear by a zero term (adaptive ODE solver, TOL=8). The objective function at the initial estimates must agree.
- OQ-FIT-007 — With the weight effect in the model the variances fall to the generating values.
- OQ-FIT-008 — The documented fit options change the run as described.
- OQ-FIT-009 — A block declared SAME repeats the estimate of the preceding block exactly; the tied model fits no better than the free one and its shared variance lies between the two free variances; a SAME without a block of the same size to repeat is refused (exit code 5), never guessed.
- OQ-FIT-010 — EVID, MDV, CMT, SS and ADDL are integer data items in NONMEM. A fractional EVID (0.9) or ADDL (1.5) must stop the run with exit code 7 and the row and column named, not be truncated to 0 or 1 silently.
- OQ-FIT-011 — A linear regression written with $PRED, in which the data column is called AMT (a reserved NONMEM name), gives exactly the ordinary-least-squares estimates, residual variance and objective function (closed form, 180 observations); renaming the column to Z changes nothing.
- OQ-FIT-012 — With --cov-matrix r (inverse Hessian) the standard errors of a linear regression are exact: SE = sqrt(s2*diag((X'X)^-1)); SE of the variance = sqrt(2 s2^2/n).
- OQ-FIT-013 — Three control streams, one of which is unsupported (ADVAN99): the other two are fitted with the same result as single fits, a table of the three outcomes is printed and written, and the exit code reports the failure (5). Combinations with options that make no sense for a batch are refused (exit code 2).
- OQ-FIT-014 — A THETA that does not enter the model leaves a singular information matrix. The covariance step must still report standard errors for the other parameters (judged without the unused one) and warn about the unused parameter.
OQ-FOR — forest: covariate effect plot (2 tests)
Forest plot ratios against an independent calculation.
| Test | Title | Risk | Requirements | Checks |
|---|---|---|---|---|
| OQ-FOR-001 | Forest plot ratios equal the covariate model evaluated at the stated values | Medium | URS-FOR-001, URS-DI-002 | 10 |
| OQ-FOR-002 | Steady-state exposure ratios: AUC and Cavg ratios are the inverse of the clearance ratio | High | URS-FOR-002 | 4 |
- OQ-FOR-001 — The ratio (x/x0)^beta is recomputed from the estimated exponents; BSV limits follow from OMEGA.
- OQ-FOR-002 — For a one-compartment oral model AUC(ss) = F*Dose/CL, so the AUC and Cavg ratio for a covariate value is (x/x0)^(-beta) of the power effect on CL, and the volume effect does not change either. The exposure rows computed by running the model code (SS=1 dose, 241-point grid) are compared with that closed form.
OQ-GENR — generate: project generator (6 tests)
Structures, bounds, closed loop.
| Test | Title | Risk | Requirements | Checks |
|---|---|---|---|---|
| OQ-GENR-001 | Generated projects of four structures: complete, with every initial estimate within its bounds | Medium | URS-GENR-001, URS-DI-002 | 32 |
| OQ-GENR-002 | Generated models can be re-fitted and reproduce the stated objective function | High | URS-GENR-001 | 11 |
| OQ-GENR-003 | Generated 1-compartment oral project: truth recovery | Medium | URS-GENR-001, URS-FIT-001 | 9 |
| OQ-GENR-004 | generate --ode: the $DES version of a model equals the analytic version | Medium | URS-GENR-001, URS-FIT-006 | 5 |
| OQ-GENR-005 | generate --approximation writes the matching $ESTIMATION record for every approximation | Low | URS-GENR-002 | 7 |
| OQ-GENR-006 | generate --gof-plots writes goodness-of-fit plots; the combination with --no-fit is refused | Low | URS-GENR-002, URS-GEN-002 | 6 |
- OQ-GENR-001 — generate writes the data, the true and the fitted base model, ready configurations and a README for 1-compartment IV, 1-compartment oral, 2-compartment oral with lag and 3-compartment infusion models.
- OQ-GENR-002 — Closed loop: data are simulated, a base model is fitted by
generate, and a second independent fit bynlmx fitreproduces its OFV. - OQ-GENR-003 — The data are simulated with CL 3.2, V 42, KA 1.1 and re-estimated.
- OQ-GENR-004 — The same design written with ADVAN4 and with $DES (ADVAN13) gives the same data and objective function.
- OQ-GENR-005 — fo, foce, foce-i, laplace and saem each give a control stream with the matching METHOD/INTERACTION/LAPLACIAN options.
- OQ-GENR-006 — The diagnostic plots (DV vs PRED, DV vs IPRED, CWRES vs time and PRED, IWRES vs IPRED) need a fitted model: they are written when the model is fitted, and asking for them with --no-fit is a usage error (exit 2) that writes nothing.
OQ-INS — inspect, validate, posterior (5 tests)
Pre-analysis checks and posterior reconstruction.
| Test | Title | Risk | Requirements | Checks |
|---|---|---|---|---|
| OQ-INS-001 | inspect lists the model, data and candidate scope without fitting | Medium | URS-INS-001 | 7 |
| OQ-INS-002 | validate: artifact reconciliation and base objective reproduction | Medium | URS-INS-001 | 7 |
| OQ-INS-003 | posterior: subject posteriors and shrinkage | Low | URS-POS-001 | 8 |
| OQ-INS-004 | validate: a consistent fit gets a PASS verdict with every check recorded | Medium | URS-INS-002 | 8 |
| OQ-INS-005 | validate: a record that was altered after the fit gets a FAIL verdict; --strict turns it into an error | High | URS-INS-002, URS-GEN-003 | 9 |
- OQ-INS-001 — The parsed model, dataset counts and covariate types equal the known content of the reference data set.
- OQ-INS-002 — validate re-evaluates the base objective at the supplied estimates and compares it with the .ext value.
- OQ-INS-003 — The posterior reconstruction runs for all 150 subjects.
- OQ-INS-004 — validate reconciles the artifacts of a fit (recomputed OFV, stationarity, conditional modes) and writes the verdict.
- OQ-INS-005 — The objective function value in the .ext file is raised by 10. validate must not pass it: verdict FAIL, exit code 0 with a clear 'NOT PASSED' notice by default, exit code 9 with --strict.
OQ-NCA — nca: non-compartmental analysis (7 tests)
Noise-free reference profiles whose parameters are known in closed form or by an independent implementation of the documented trapezoid rules.
| Test | Title | Risk | Requirements | Checks |
|---|---|---|---|---|
| OQ-NCA-001 | IV bolus, noise-free mono-exponential: all parameters against closed forms | High | URS-NCA-001, URS-NCA-002 | 56 |
| OQ-NCA-002 | Oral, noise-free: Cmax, Tmax, AUClast, AUMClast, extrapolated parameters | High | URS-NCA-001, URS-NCA-003 | 29 |
| OQ-NCA-003 | Linear trapezoid rule | High | URS-NCA-001 | 14 |
| OQ-NCA-004 | Partial AUC (0-4 h) | Medium | URS-NCA-004 | 7 |
| OQ-NCA-005 | Summary statistics across individuals | Medium | URS-NCA-005 | 18 |
| OQ-NCA-006 | Terminal slope method: none; settings recorded | Low | URS-NCA-002, URS-DI-001 | 3 |
| OQ-NCA-007 | AUC and AUMC of nearly flat profiles and of profiles at extreme scales equal 80-digit reference values | High | URS-NCA-006 | 8 |
- OQ-NCA-001 — For a noise-free one-compartment IV bolus every NCA parameter has an exact value: AUCinf = Dose/CL, t1/2 = ln2/k, Vz = Vss = V, MRT = 1/k, C0 = Dose/V; AUClast and AUMClast are computed independently with the documented linear-up/log-down rules.
- OQ-NCA-002 — The same for an oral profile (CL/F and Vz/F). The terminal slope is regressed on late points that still hold a trace of absorption, so the extrapolated parameters agree with the closed forms to about 0.3 % (tolerance 0.5 %).
- OQ-NCA-003 — --auc-method linear gives the linear-trapezoid areas (independent calculation).
- OQ-NCA-004 — The partial area up to a sampled time equals the independent trapezoid sum.
- OQ-NCA-005 — Mean, SD (n-1), geometric mean, minimum and maximum of AUClast, AUMClast and Cmax across the 3 individuals equal the independent calculation.
- OQ-NCA-006 — With --lz-method none no extrapolated parameter is reported.
- OQ-NCA-007 — The logarithmic trapezoid subtracts nearly equal numbers on a flat profile; with times near 1000 and concentrations of 3e6 or 1e-9 any scaling error shows. Three subjects (normal, large, tiny) are compared with the integrals computed with 80-digit decimal arithmetic.
OQ-PWR — power: sample size and power (5 tests)
FIM and SSE.
| Test | Title | Risk | Requirements | Checks |
|---|---|---|---|---|
| OQ-PWR-001 | FIM: standard errors agree with the fit and scale with 1/sqrt(N) | Medium | URS-PWR-001, URS-DI-002 | 10 |
| OQ-PWR-002 | SSE: simulation and re-estimation recover the model | Low | URS-PWR-002 | 11 |
| OQ-PWR-003 | Wald power and the sample size for the target power equal the closed form | High | URS-PWR-003 | 4 |
| OQ-PWR-004 | FIM power is exact for a linear model: standard errors equal the closed form | High | URS-PWR-004 | 5 |
| OQ-PWR-005 | FIM power says what it does not model (compliance, quantification limit) | Medium | URS-PWR-005 | 2 |
- OQ-PWR-001 — The expected Fisher information of the dataset's own design predicts the standard errors that the fit estimates; doubling N reduces every SE by sqrt(2).
- OQ-PWR-002 — 30 trials of 150 subjects are simulated from the fitted model and re-estimated; the average estimates must recover the simulated values.
- OQ-PWR-003 — From each standard error the non-centrality ((b-b0)/se)^2, the power Phi(sqrt(L)-z)+Phi(-sqrt(L)-z) and the number of subjects for 80 % power (L scales with N) are recomputed with the standard library and compared with fim_power.csv for two sample sizes.
- OQ-PWR-004 — For a linear regression the information matrix is exact: with the 30 subjects of the data the FIM standard errors equal sqrt(s2*diag((X'X)^-1)).
- OQ-PWR-005 — The Fisher-information method is that of fully dosed subjects with every observation quantified. When the design asks for compliance below 1 or an LLOQ the program must warn, and the warning must be in the written summary.
OQ-QCD — qc-data: dataset quality control (4 tests)
Clean and defective datasets, exit-code gating and file-format checks.
| Test | Title | Risk | Requirements | Checks |
|---|---|---|---|---|
| OQ-QCD-001 | Clean dataset: complete outputs and no failing check | High | URS-QCD-001, URS-QCD-003, URS-DI-002 | 10 |
| OQ-QCD-002 | Dataset with known defects: every defect is found | High | URS-QCD-001, URS-QCD-002 | 18 |
| OQ-QCD-003 | --fail-on: exit code 7 only when the level is reached | Medium | URS-QCD-003, URS-GEN-003 | 5 |
| OQ-QCD-004 | File-format defects: byte-order mark and mixed line endings | Medium | URS-QCD-004 | 2 |
- OQ-QCD-001 — A clean reference dataset passes the QC with every output written.
- OQ-QCD-002 — Each of 12 seeded defects (one per individual) is reported against the right individual; clean individuals are not flagged.
- OQ-QCD-003 — --fail-on gates a pipeline on data quality.
- OQ-QCD-004 — Format problems that break NM-TRAN are detected.
OQ-QCN — qc-nm: control stream quality control (4 tests)
Seeded control-stream errors, the original-unchanged guarantee, corrections to a copy.
| Test | Title | Risk | Requirements | Checks |
|---|---|---|---|---|
| OQ-QCN-001 | Control stream with known defects | High | URS-QCN-001, URS-QCN-002 | 11 |
| OQ-QCN-002 | The original control stream is never changed; --fail-on gating | High | URS-QCN-003, URS-GEN-005, URS-GEN-003 | 3 |
| OQ-QCN-003 | Clean control stream | Medium | URS-QCN-001 | 1 |
| OQ-QCN-004 | Safe corrections are written to a copy; --no-fix writes none | High | URS-QCN-003 | 7 |
- OQ-QCN-001 — Seeded control-stream errors are found and the verdict is NOT READY.
- OQ-QCN-002 — qc-nm only reads its input; exit code 6 gates a pipeline.
- OQ-QCN-003 — A correct control stream has no failing check.
- OQ-QCN-004 — Corrections go to a copy with the changes listed.
OQ-REP — report: Markdown to documents (3 tests)
Format conversion and switches.
| Test | Title | Risk | Requirements | Checks |
|---|---|---|---|---|
| OQ-REP-001 | Markdown to Markdown, Word, PDF and HTML | Low | URS-REP-001 | 12 |
| OQ-REP-002 | Output switches | Low | URS-REP-001 | 4 |
| OQ-REP-003 | Visual review of the Word and PDF documents (manual) | Low | URS-REP-001 | 2 |
- OQ-REP-001 — All four output formats are written and carry the content.
- OQ-REP-002 — --no-docx and --no-pdf switch outputs off; HTML is off unless requested.
- OQ-REP-003 — A person confirms the typesetting.
OQ-SCR — screen: structural model screen (1 test)
Model comparison on the reference population.
| Test | Title | Risk | Requirements | Checks |
|---|---|---|---|---|
| OQ-SCR-001 | Screen recommends the generating structure and writes a fittable model | Medium | URS-SCR-001, URS-DI-002 | 10 |
- OQ-SCR-001 — The structural screen picks the structure that generated the data and its control stream can be fitted.
OQ-SIM — sims: exposure simulation (5 tests)
Closed-form exposure metrics and seed control.
| Test | Title | Risk | Requirements | Checks |
|---|---|---|---|---|
| OQ-SIM-001 | Steady-state exposure of a model without variability equals the closed forms | High | URS-SIM-001, URS-DI-002 | 14 |
| OQ-SIM-002 | Seed control of the simulation | Medium | URS-SIM-002, URS-DI-004, URS-DI-007 | 6 |
| OQ-SIM-003 | Summary statistics of the simulated exposure metrics equal an independent recomputation | High | URS-SIM-003 | 3 |
| OQ-SIM-004 | Pediatric population: CDC weight-for-age z-scores from a supplied table and the dose rules | High | URS-SIM-004 | 6 |
| OQ-SIM-005 | A random-effects covariance matrix that is not positive definite is refused | Medium | URS-SIM-005, URS-GEN-003 | 4 |
- OQ-SIM-001 — With all random effects and the residual error fixed at zero, the steady-state profile of 100 mg q24h of a one-compartment oral model (CL 4, V 40, KA 1.2) has exact values: AUCtau = Dose/CL = 25, Cavg = 25/24, Ctrough and Cmax from the closed-form superposition (computed independently, 20 doses).
- OQ-SIM-002 — Same seed gives the same simulated data; a different seed gives a different realisation (checked by an inverted comparison below).
- OQ-SIM-003 — From the per-subject metrics of 40 simulated subjects, N, mean, SD, CV, geometric mean and CV, minimum, 5th/25th/50th/75th/95th percentile and maximum of five metrics are recomputed from first principles (type-7 percentiles) and compared with the summary table.
- OQ-SIM-004 — With a user-supplied CDC LMS table (--cdc-table) the weight of each simulated child must correspond to the written z-score by the LMS formula with L, M, S interpolated linearly in age; the dose is 2 mg/kg rounded to 5 mg and capped at 100 mg.
- OQ-SIM-005 — An $OMEGA BLOCK whose correlation exceeds 1 can not generate random effects; sims must stop with the numerical-failure exit code (9) and say why, instead of producing numbers.
OQ-STU — simulate-study (1 test)
Smoke test.
| Test | Title | Risk | Requirements | Checks |
|---|---|---|---|---|
| OQ-STU-001 | simulate-study runs and writes its result tables | Low | URS-STU-001, URS-DI-002 | 9 |
- OQ-STU-001 — A two-replicate study of the covariate screen on simulated data; this is a smoke test of the study machinery (the operating characteristics need many replicates).
OQ-VPC — vpc: visual and numerical predictive checks (4 tests)
Predictive checks of a model that generated the data.
| Test | Title | Risk | Requirements | Checks |
|---|---|---|---|---|
| OQ-VPC-001 | VPC and pcVPC of the correct model: observed percentiles inside the simulated intervals | Medium | URS-VPC-001, URS-DI-002 | 22 |
| OQ-VPC-002 | NPC: observed fractions beyond the prediction intervals are near nominal | Medium | URS-VPC-001 | 8 |
| OQ-VPC-003 | VPC variants: pvcVPC, stratification and binning | Low | URS-VPC-002 | 10 |
| OQ-VPC-004 | VPC observed statistics, binning and prediction correction equal an independent recomputation | High | URS-VPC-003 | 7 |
- OQ-VPC-001 — The data were simulated from the fitted model, so the observed 5th, 50th and 95th percentiles lie inside the simulated 95 % intervals in nearly all of the 10 time bins (a 95 % interval is expected to miss in 5 % of cases by chance).
- OQ-VPC-002 — Over 1500 observations the fractions of observations below/above each simulated prediction interval must be close to the nominal fraction.
- OQ-VPC-003 — Stratification and binning options give the requested tables and plots with the right observation counts.
- OQ-VPC-004 — For equal-count bins, user-defined bin edges and a prediction-corrected VPC, the observed 5th/50th/95th percentile and the median prediction of every bin, the proportional prediction correction DV*PRED_bin/PRED, and the NPC outside-flags are recomputed from the observation table.
PQ — Performance qualification (3 tests)
Whole-workflow and scale tests with realistic use.
| Test | Title | Risk | Requirements | Checks |
|---|---|---|---|---|
| PQ-001 | Complete workflow on the reference population (twelve commands in sequence) | High | URS-FIT-001, URS-COV-001, URS-VPC-001, URS-GEN-005 | 24 |
| PQ-002 | Closed loop: generate a project with known covariate effects, analyse it, recover them | High | URS-GENR-001, URS-COV-001 | 9 |
| PQ-003 | Performance and scale: 600 subjects, two-compartment model | Low | URS-SYS-003, URS-FIT-001, URS-GENR-001 | 5 |
- PQ-001 — The commands are run in the order an analyst would use them, each taking the previous result as input: data check, control-stream check, exploration, initial estimates, structural screen, base fit, covariate screen, covariate fit, VPC, forest plot, exposure simulation, power. The end result must agree with the known truth.
- PQ-002 — The project generator is the data source with true effects CL
EGFR 0.6, CLWT 0.75, V~WT 1.0; the covariate analysis of the generated base model has to find them. - PQ-003 — A larger data set (600 subjects, a 2-compartment model) is processed within the step time limit of 10 minutes (about 10 s on the supplier's machine); the elapsed time is recorded in the execution record.
DI — Data integrity and reproducibility (11 tests)
Checks of the controls of electronic records.
| Test | Title | Risk | Requirements | Checks |
|---|---|---|---|---|
| DI-001 | Every command writes a transcript with the program version, the full command line and time stamps | High | URS-DI-001, URS-GEN-001 | 28 |
| DI-002 | A checksum list for every command, and it verifies | High | URS-DI-002 | 33 |
| DI-003 | A change to an output file after the run is detected | High | URS-DI-009 | 1 |
| DI-004 | Existing results are never overwritten without --overwrite; logs are retained | High | URS-GEN-004, URS-DI-001 | 39 |
| DI-005 | Input files are never modified by any command | High | URS-GEN-005 | 2 |
| DI-006 | Same inputs, settings and seed give identical results (reproducibility) | High | URS-DI-004, URS-DI-007 | 18 |
| DI-007 | A different seed gives a different random result | Medium | URS-DI-007 | 2 |
| DI-008 | Results do not depend on the number of worker threads | High | URS-DI-005 | 15 |
| DI-009 | Results do not depend on the line-ending convention of the data file (LF or CRLF) | Medium | URS-DI-006 | 3 |
| DI-010 | An interrupted posterior-stability run is resumed from its checkpoint with the result of an uninterrupted run | Medium | URS-DI-008 | 9 |
| DI-011 | A run is not resumed after its inputs or settings were changed | Medium | URS-DI-010 | 6 |
- DI-001 — The transcript is the audit record of the run.
- DI-002 — Each command lists the SHA-256 of every file it wrote; the runner recomputes the hashes of all files and finds no difference.
- DI-003 — A checksum list is only useful when a changed file is noticed.
- DI-004 — For twelve commands the second run into the same folder ends with exit code 3, and the hash comparison proves that no result file of the first run changed.
- DI-005 — The data set, control streams and settings files are hashed, fifteen commands are run on them (including
qc-nmwhich proposes corrections), and the hashes are compared. - DI-006 — Each stochastic command is run twice with the same seed; the numerical result files are compared byte for byte. (Transcripts and HTML reports carry times and are excluded.)
- DI-007 — Results that depend on random numbers change with the seed (otherwise the seed would be ignored).
- DI-008 — Parallel summation and resampling must not change the numbers.
- DI-009 — A data set made on Windows (CRLF) and one made on Linux/macOS (LF) must give the same answer.
- DI-010 — Long runs can be interrupted (power failure, closed session); resuming must not change the scientific result.
- DI-011 — An interrupted run is bound to its settings. If the settings file is changed afterwards (4000 -> 4001 replicates), resume must refuse with exit code 11 instead of mixing results of two configurations.
2 Risk register
Each row: severity S, probability P and detectability D on a 1–3 scale; RPN = S × P × D; class High ≥ 9, Medium 4–8, Low < 4 (page 42.4).
| Risk | Area | Function | Hazard | S | P | D | RPN | Class | Requirements |
|---|---|---|---|---|---|---|---|---|---|
| RK-01 | fit | Objective function (FOCE-I, Laplace, FO, FOCE, SAEM) | wrong objective function or wrong estimates (silent numerical error) | 3 | 2 | 3 | 18 | High | URS-FIT-001, URS-FIT-002, URS-FIT-005 |
| RK-02 | fit | Predictions, residuals, ETAs | wrong IPRED/PRED/residual tables used for diagnostics | 3 | 1 | 3 | 9 | High | URS-FIT-003 |
| RK-03 | fit | Analytic vs linear $DES vs ODE | ODE/matrix-exponential result differs from the closed form | 3 | 2 | 3 | 18 | High | URS-FIT-006 |
| RK-04 | fit | Covariate model in $PK | covariate effect biased | 3 | 1 | 3 | 9 | High | URS-FIT-007 |
| RK-05 | fit | Output files (.ext .phi .cov ...) | malformed NONMEM-format files break downstream tools or hide a result | 2 | 1 | 2 | 4 | Medium | URS-FIT-004, URS-FIT-008 |
| RK-06 | nca | AUC/AUMC trapezoid rules, terminal slope, derived parameters | wrong NCA parameter (exposure, dose-proportionality, bioequivalence-type conclusions) | 3 | 1 | 3 | 9 | High | URS-NCA-001, URS-NCA-002, URS-NCA-003, URS-NCA-004, URS-NCA-005 |
| RK-07 | vpc | VPC / pcVPC / NPC | wrong model-evaluation conclusion | 2 | 1 | 2 | 4 | Medium | URS-VPC-001, URS-VPC-002 |
| RK-08 | cov | Covariate selection (frozen, scm, posterior, both) | false inclusion or omission of a covariate in a submission model | 3 | 2 | 2 | 12 | High | URS-COV-001, URS-COV-002, URS-COV-003 |
| RK-09 | forest | Forest plot ratios | wrong effect size presented | 2 | 1 | 3 | 6 | Medium | URS-FOR-001 |
| RK-10 | sims | Steady-state exposure metrics | wrong simulated exposure (dose selection) | 3 | 1 | 3 | 9 | High | URS-SIM-001, URS-SIM-002 |
| RK-11 | power | FIM / SSE | wrong sample size or power | 3 | 1 | 2 | 6 | Medium | URS-PWR-001, URS-PWR-002 |
| RK-12 | er | Exposure-response regression | wrong exposure-response parameter | 3 | 1 | 3 | 9 | High | URS-ER-001, URS-ER-002 |
| RK-13 | qc-data | Dataset QC | a defective dataset passes unnoticed | 3 | 1 | 3 | 9 | High | URS-QCD-001, URS-QCD-002, URS-QCD-003, URS-QCD-004 |
| RK-14 | qc-nm | Control-stream QC and safe fixes | a faulty model passes or a 'fix' changes the model's meaning | 3 | 1 | 3 | 9 | High | URS-QCN-001, URS-QCN-002, URS-QCN-003 |
| RK-15 | eda/custom | Tables and plots | wrong summary statistic | 2 | 1 | 2 | 4 | Medium | URS-EDA-001, URS-EDA-002, URS-CUS-001, URS-CUS-002 |
| RK-16 | autoinit/screen | Initial estimates, structural screen | poor starting values or wrong structure recommendation | 2 | 1 | 1 | 2 | Low | URS-INI-001, URS-SCR-001 |
| RK-17 | generate/study | Project generator, simulation study | unusable generated project; wrong bounds (initial estimate on a bound) | 2 | 2 | 1 | 4 | Medium | URS-GENR-001, URS-STU-001 |
| RK-18 | report | Markdown to DOCX/PDF/HTML | report loses text, tables or numbers | 2 | 1 | 1 | 2 | Low | URS-REP-001 |
| RK-19 | ask | Language-model assistant | assistant runs a forbidden or harmful command; unrecorded actions | 3 | 2 | 2 | 12 | High | URS-ASK-001, URS-ASK-002 |
| RK-20 | data integrity | Transcripts and audit trail | missing or overwritten record of what was run | 3 | 1 | 3 | 9 | High | URS-DI-001, URS-GEN-001 |
| RK-21 | data integrity | Checksums | altered output not detected | 3 | 1 | 3 | 9 | High | URS-DI-002, URS-DI-009 |
| RK-22 | data integrity | Overwrite protection | existing results silently replaced | 3 | 2 | 3 | 18 | High | URS-GEN-004 |
| RK-23 | data integrity | Input protection | input data or model modified by a command | 3 | 1 | 3 | 9 | High | URS-GEN-005 |
| RK-24 | data integrity | Reproducibility (seed, threads, line endings) | result not reproducible, or dependent on threads or on CRLF | 3 | 2 | 3 | 18 | High | URS-DI-004, URS-DI-005, URS-DI-006, URS-DI-007 |
| RK-25 | data integrity | Checkpoint and resume | resumed run differs from uninterrupted run | 2 | 1 | 2 | 4 | Medium | URS-DI-008 |
| RK-26 | data integrity | Input manifest | traceability of inputs lost | 2 | 1 | 2 | 4 | Medium | URS-DI-003, URS-COV-003 |
| RK-27 | general | Failure handling (exit codes, hints) | silent failure or exit code 0 after an error | 3 | 1 | 3 | 9 | High | URS-GEN-002, URS-GEN-003, URS-GEN-009 |
| RK-28 | general | Settings files, schema, logging, help, licence | settings silently ignored; unknown keys accepted | 2 | 1 | 2 | 4 | Medium | URS-GEN-006, URS-GEN-007, URS-GEN-008, URS-GEN-010 |
| RK-29 | installation | Executable identity and integrity | wrong or modified program used | 3 | 1 | 2 | 6 | Medium | URS-GEN-001 |
| RK-30 | installation | Platform (write access, graphics, threads) | plots or files cannot be written on the target computer | 2 | 1 | 1 | 2 | Low | URS-GEN-001 |
| RK-31 | inspect/validate/posterior | Pre-checks and posterior reconstruction | wrong reconciliation of artifacts; wrong posterior | 2 | 1 | 2 | 4 | Medium | URS-INS-001, URS-POS-001 |
| RK-32 | fit | Model-language items: SAME blocks, $PRED with data items named like NONMEM reserved names, integer event items | tied parameters not tied or tied wrongly; a data column read as a dose; a fractional EVID/ADDL truncated silently | 3 | 2 | 3 | 18 | High | URS-FIT-009, URS-FIT-010, URS-FIT-011 |
| RK-33 | fit | Standard errors, batch fitting, unused parameters | wrong standard errors (silent); batch results different from single fits; one failure hiding the others | 3 | 1 | 3 | 9 | High | URS-FIT-012, URS-FIT-013, URS-FIT-014 |
| RK-34 | inspect/validate | Acceptance verdict of validate | an altered or inconsistent set of artifacts accepted (false PASS) | 3 | 1 | 3 | 9 | High | URS-INS-002 |
| RK-35 | nca | Numerical range of AUC/AUMC | loss of precision or overflow with flat profiles or extreme magnitudes | 3 | 1 | 3 | 9 | High | URS-NCA-006 |
| RK-36 | sims | Study population, doses, summary statistics, invalid random-effects matrix | wrong weights or doses; wrong summary statistics; an invalid OMEGA accepted | 3 | 2 | 2 | 12 | High | URS-SIM-003, URS-SIM-004, URS-SIM-005 |
| RK-37 | vpc/forest/power | Observed VPC statistics, exposure ratios, Wald power | a misleading predictive check, forest plot or sample size | 2 | 2 | 3 | 12 | High | URS-VPC-003, URS-FOR-002, URS-PWR-003, URS-PWR-004, URS-PWR-005 |
| RK-38 | er | Time-to-event and median analyses | wrong hazard ratio, survival or interval | 3 | 1 | 3 | 9 | High | URS-ER-003, URS-ER-004 |
| RK-39 | generate/ask | Generator options; assistant path policy | wrong estimation record written; the assistant reads outside its folders through a settings file | 3 | 1 | 2 | 6 | Medium | URS-GENR-002, URS-ASK-003 |
| RK-40 | cov | Stepwise search equivalence | the selected model differs from the model it reports (reference-value or parametrisation error) | 3 | 1 | 3 | 9 | High | URS-COV-004 |
| RK-41 | data integrity | Resume binding to settings | a resumed run mixing two configurations | 3 | 1 | 2 | 6 | Medium | URS-DI-010 |
| RK-42 | general | Per-command help and option ranges | help that misleads; an out-of-range value accepted | 1 | 1 | 1 | 1 | Low | URS-GEN-011 |
Test strategy per risk
- RK-01 (fit, RPN 18, High) — Independent numerical marginal likelihood; truth recovery on 150-subject data; method comparison; regression baseline
- RK-02 (fit, RPN 9, High) — Independent recomputation of 1500 IPRED values (1e-5)
- RK-03 (fit, RPN 18, High) — Same model three ways (1e-9 / 1e-7)
- RK-04 (fit, RPN 9, High) — Truth recovery (exponents 0.75, 1.0)
- RK-05 (fit, RPN 4, Medium) — Presence, headers, iteration markers, row counts
- RK-06 (nca, RPN 9, High) — Closed forms for noise-free profiles and independent trapezoid code (1e-8)
- RK-07 (vpc, RPN 4, Medium) — Correct-model VPC inside intervals; NPC fractions near nominal; variants smoke
- RK-08 (cov, RPN 12, High) — Known truth: WT retained, AGE/SEX/EGFR/NOISE rejected; engines differ (scm shows refit dOFV); input hashes verified
- RK-09 (forest, RPN 6, Medium) — Independent (x/x0)^beta calculation (1e-3)
- RK-10 (sims, RPN 9, High) — Closed forms (AUC=Dose/CL, Cavg, Cmax, trough); seed control
- RK-11 (power, RPN 6, Medium) — SE agrees with the fit and scales 1/sqrt(N); SSE recovers the model
- RK-12 (er, RPN 9, High) — Known truth (Emax, logistic, Poisson, Cox, ordinal) and independent GLM fits
- RK-13 (qc-data, RPN 9, High) — Dirty data set with known defects (expected finding counts); clean data passes; --fail-on exit codes
- RK-14 (qc-nm, RPN 9, High) — Faulty/fixable models with known findings; original untouched; --no-fix
- RK-15 (eda/custom, RPN 4, Medium) — Statistics vs independent values; filters; mutate
- RK-16 (autoinit/screen, RPN 2, Low) — Truth region; recommended structure; written model fits
- RK-17 (generate/study, RPN 4, Medium) — 4 structures: bounds checked, re-fit reproduces OFV, --ode equals analytic; study smoke
- RK-18 (report, RPN 2, Low) — Text/tables carried over (OOXML search, PDF header)
- RK-19 (ask, RPN 12, High) — Scripted guardrail tests (5 classes), session record, no-model exit 3; manual real-model check
- RK-20 (data integrity, RPN 9, High) — Every command: version, command line, time stamps; logs retained on --overwrite
- RK-21 (data integrity, RPN 9, High) — 15 commands verified; one-bit change detected
- RK-22 (data integrity, RPN 18, High) — 12 commands: second run refused (exit 3) with hashes unchanged
- RK-23 (data integrity, RPN 9, High) — 15 commands; hashes of inputs before/after
- RK-24 (data integrity, RPN 18, High) — Same seed byte-identical (7 commands); threads 1 vs 4; CRLF vs LF; different seed differs
- RK-25 (data integrity, RPN 4, Medium) — Interrupt after first checkpoint, resume, compare result tables byte for byte
- RK-26 (data integrity, RPN 4, Medium) — SHA-256 of every recorded input recomputed
- RK-27 (general, RPN 9, High) — Every documented exit code (2,3,4,5,6,7) provoked; unsupported feature refused
- RK-28 (general, RPN 4, Medium) — Templates round trip; invalid values rejected (exit 4); logging options; licence date
- RK-29 (installation, RPN 6, Medium) — IQ: version, SHA-256 recorded, release date, licence valid
- RK-30 (installation, RPN 2, Low) — IQ-005..007
- RK-31 (inspect/validate/posterior, RPN 4, Medium) — Counts vs data; recomputed OFV; 150 subject posteriors
- RK-32 (fit, RPN 18, High) — Free vs tied fits (relations of the estimates and of the OFV); least-squares closed form; fractions refused with exit 7; malformed SAME refused
- RK-33 (fit, RPN 9, High) — Standard errors of a linear model against the closed form; batch OFV = single OFV; failure tabulated and exit code
- RK-34 (inspect/validate, RPN 9, High) — Altered OFV gives FAIL, exit 9 with --strict; consistent fit passes
- RK-35 (nca, RPN 9, High) — Three profiles against 80-digit reference values (1e-9)
- RK-36 (sims, RPN 12, High) — Independent LMS z-scores and dose rules; independent summary statistics; indefinite OMEGA refused (exit 9)
- RK-37 (vpc/forest/power, RPN 12, High) — Independent bin percentiles and correction; closed-form exposure ratios and Wald power; exact FIM on a linear model; unmodelled features warned
- RK-38 (er, RPN 9, High) — Independent Cox, Kaplan-Meier, log-rank; independent medians and order-statistic intervals
- RK-39 (generate/ask, RPN 6, Medium) — $ESTIMATION records of five approximations; plots only for fitted models; outside references refused with the reason
- RK-40 (cov, RPN 9, High) — Final refit OFV and exponents against an explicit fit
- RK-41 (data integrity, RPN 6, Medium) — Changed settings: resume refused (exit 11)
- RK-42 (general, RPN 1, Low) — Help text of one command and of the full list; out-of-range value refused (exit 2)
3 Requirements by area
The tests column lists the tests that trace to the requirement; the traceability matrix is generated from the same files and refuses a requirement without a test.
General (11)
| Requirement | Criticality | Statement | Reference | Tests |
|---|---|---|---|---|
| URS-GEN-001 | High | The program shall identify itself (name, version, release date) on request and in the first lines of every log. | COMMANDS.md §7 | IQ-001, DI-001 |
| URS-GEN-002 | Medium | Every command shall provide built-in help, and incorrect command-line usage shall be rejected (exit code 2) before anything is written. | COMMANDS.md §8-9 | IQ-002, OQ-GEN-001, OQ-GEN-002, OQ-GEN-009, OQ-GENR-006 |
| URS-GEN-003 | High | Each class of failure shall end with its documented exit code and an explanatory message with a hint; no failure shall end silently or with exit code 0. | COMMANDS.md §9 | OQ-GEN-002, OQ-GEN-003, OQ-ASK-003, OQ-FIT-010, OQ-INS-005, OQ-QCD-003, OQ-QCN-002, OQ-SIM-005 |
| URS-GEN-004 | High | The program shall not write into an existing non-empty output folder unless --overwrite is given, and shall leave the existing files untouched when it refuses. | COMMANDS.md §8 | DI-004 |
| URS-GEN-005 | High | No command shall modify its input files (datasets, control streams, settings files). | README.md | OQ-QCN-002, PQ-001, DI-005 |
| URS-GEN-006 | Medium | Settings files shall be validated (invalid values and unknown keys rejected with exit code 4) and every command that reads a settings file shall be able to write its annotated template (--print-config). | COMMANDS.md §8 | OQ-GEN-003, OQ-GEN-004 |
| URS-GEN-007 | Medium | The licence shall be displayable (--license). | COMMANDS.md §9 | IQ-004 |
| URS-GEN-008 | Low | The logging options (-v, -q, --no-color, --log-file, --suppress-console) shall work as documented. | COMMANDS.md §8 | OQ-GEN-006 |
| URS-GEN-009 | High | Model features the program does not support (for example $MIX) shall be refused explicitly (exit code 5), never approximated silently. | THINGS_TO_KNOW.md | OQ-GEN-003, OQ-FIT-009 |
| URS-GEN-010 | Low | The configuration reference (schema) shall be available from the program. | COMMANDS.md §6 | OQ-GEN-007 |
| URS-GEN-011 | Low | Each command shall give help that lists only its own options (with a pointer to the full list), and a value outside the documented range of an option shall be refused as a usage error (exit code 2) before anything is written. | COMMANDS.md §8-9 | OQ-GEN-008, OQ-GEN-009 |
Data integrity (10)
| Requirement | Criticality | Statement | Reference | Tests |
|---|---|---|---|---|
| URS-DI-001 | High | Every run shall write a time-stamped transcript (version, full command line, settings, stages, warnings, errors) into its output folder, and an earlier transcript shall never be overwritten by a later run. | COMMANDS.md §8 | OQ-GEN-006, OQ-ASK-002, OQ-NCA-006, DI-001, DI-004 |
| URS-DI-002 | High | Every analysis command shall write a SHA-256 checksum list (checksums.sha256) of all the files it wrote. | COMMANDS.md §8 | OQ-INI-001, OQ-COV-001, OQ-EDA-001, OQ-FIT-001, OQ-FIT-004, OQ-FOR-001, OQ-GENR-001, OQ-PWR-001, OQ-QCD-001, OQ-SCR-001, OQ-SIM-001, OQ-STU-001, OQ-VPC-001, DI-002 |
| URS-DI-003 | Medium | The inputs of a run shall be traceable: multi-file analyses record the SHA-256 of every input (input_manifest.json); fit records the command that reproduces it (fit_command.txt). | COMMANDS.md §3-4; FITTING.md | OQ-COV-004, OQ-FIT-004, OQ-FIT-008 |
| URS-DI-004 | High | The same inputs, settings and seed shall give identical output files. | README.md | OQ-INI-002, OQ-SIM-002, DI-006 |
| URS-DI-005 | High | Results shall not depend on the number of worker threads. | COMMANDS.md §8 | IQ-007, DI-008 |
| URS-DI-006 | Medium | Results shall not depend on the line-ending convention (LF or CRLF) of text inputs. | QC-DATA.md | DI-009 |
| URS-DI-007 | Medium | Random numbers shall be controlled by a seed; a different seed shall give a different random result. | COMMANDS.md §8 | OQ-INI-002, OQ-SIM-002, DI-006, DI-007 |
| URS-DI-008 | Medium | An interrupted posterior-stability run shall be resumable from its checkpoint with the result of an uninterrupted run. | COMMANDS.md §5 | DI-010 |
| URS-DI-009 | High | A change to any output file after the run shall be detectable with the checksum list. | COMMANDS.md §8 | IQ-003, DI-003 |
| URS-DI-010 | Medium | A run shall not be resumed when its inputs or settings changed after the checkpoint was written (exit code 11). | COMMANDS.md §5 | DI-011 |
qc-data (4)
| Requirement | Criticality | Statement | Reference | Tests |
|---|---|---|---|---|
| URS-QCD-001 | High | The dataset QC shall run the documented checks (99 in ten categories), write a pass/warn/fail checklist and list every finding with its record line, individual, column and value. | QC-DATA.md | OQ-GEN-005, OQ-QCD-001, OQ-QCD-002 |
| URS-QCD-002 | High | The QC shall detect the data defects that would corrupt an analysis: duplicated records, decreasing time, negative or missing concentrations, non-numeric values, doses without observations and the reverse, implausible covariates, inconsistent EVID/MDV/AMT. | QC-DATA.md | OQ-QCD-002 |
| URS-QCD-003 | High | A clean dataset shall produce no failing check, and --fail-on shall end with exit code 7 only when the chosen level is reached. | QC-DATA.md | OQ-QCD-001, OQ-QCD-003 |
| URS-QCD-004 | Medium | File-format problems (byte-order mark, mixed line endings) shall be detected. | QC-DATA.md | OQ-QCD-004 |
qc-nm (3)
| Requirement | Criticality | Statement | Reference | Tests |
|---|---|---|---|---|
| URS-QCN-001 | High | The control-stream QC shall run the documented checks (81), write a checklist, the findings with line numbers and a verdict. | QC-NM.md | OQ-GEN-005, OQ-QCN-001, OQ-QCN-003 |
| URS-QCN-002 | High | The QC shall detect inconsistencies between control stream and model (missing required parameters, ETA beyond $OMEGA, $INPUT against the dataset). | QC-NM.md | OQ-QCN-001 |
| URS-QCN-003 | High | Safe corrections shall be written to a copy ( |
QC-NM.md | OQ-QCN-002, OQ-QCN-004 |
eda (2)
| Requirement | Criticality | Statement | Reference | Tests |
|---|---|---|---|---|
| URS-EDA-001 | Medium | The exploratory analysis shall write the standard summary tables and plots, and a report, for a PK/PD dataset; the counts and statistics shall be correct. | EDA.md | OQ-GEN-005, OQ-EDA-001, OQ-EDA-003 |
| URS-EDA-002 | Low | A column created or changed with --mutate shall be available to the tables and plots. | EDA.md | OQ-EDA-002 |
custom (2)
| Requirement | Criticality | Statement | Reference | Tests |
|---|---|---|---|---|
| URS-CUS-001 | Medium | The custom command shall draw the requested plots and write the requested tables from any dataset with correct statistics. | CUSTOM.md | OQ-CUS-001, OQ-CUS-002, OQ-CUS-003 |
| URS-CUS-002 | Medium | Filters and new columns in R syntax shall be applied to the data before plotting or tabulating. | CUSTOM.md | OQ-CUS-002 |
report (1)
| Requirement | Criticality | Statement | Reference | Tests |
|---|---|---|---|---|
| URS-REP-001 | Low | The report command shall turn Markdown into Markdown, Word, PDF and (on request) HTML documents that carry the text, tables and lists of the source. | REPORT.md | OQ-REP-001, OQ-REP-002, OQ-REP-003 |
nca (6)
| Requirement | Criticality | Statement | Reference | Tests |
|---|---|---|---|---|
| URS-NCA-001 | High | AUC and AUMC to the last sample shall be computed by the documented trapezoid rules (linear, linear-log, linear-up-log-down). | NCA.md §4 | OQ-NCA-001, OQ-NCA-002, OQ-NCA-003 |
| URS-NCA-002 | High | The terminal slope and the parameters that depend on it (half-life, AUC and AUMC to infinity, CL, Vz, Vss, MRT) shall be correct for an intravenous bolus profile. | NCA.md §5 | OQ-NCA-001, OQ-NCA-006 |
| URS-NCA-003 | High | Cmax, Tmax and the extravascular parameters (CL/F, Vz/F) shall be correct for an oral profile. | NCA.md | OQ-NCA-002 |
| URS-NCA-004 | Medium | Partial areas shall be computed on request. | NCA.md §4.4 | OQ-NCA-004 |
| URS-NCA-005 | Medium | Summary statistics (mean, SD, geometric mean, min, max) of the parameters across individuals shall be correct. | NCA.md | OQ-NCA-005 |
| URS-NCA-006 | High | AUC and AUMC shall be correct for nearly flat profiles and for times and concentrations of extreme magnitude, with no loss of precision from the logarithmic trapezoid. | NCA.md §4 | OQ-NCA-007 |
autoinit (1)
| Requirement | Criticality | Statement | Reference | Tests |
|---|---|---|---|---|
| URS-INI-001 | Medium | Initial estimates (CL, V, KA and the variances) from the data alone shall be close to the values that generated the data, and be written as ready NONMEM blocks. | AUTOINIT.md | OQ-INI-001 |
screen (1)
| Requirement | Criticality | Statement | Reference | Tests |
|---|---|---|---|---|
| URS-SCR-001 | Medium | The structural-model screen shall fit the candidate compartment models, compare them (OFV, AIC, BIC, LRT), recommend the structure that generated the data and write a control stream of it that can be fitted. | SCREEN.md | OQ-SCR-001 |
fit (14)
| Requirement | Criticality | Statement | Reference | Tests |
|---|---|---|---|---|
| URS-FIT-001 | High | The estimator shall recover the parameters that generated the data (fixed effects, variances, residual error) within statistical error. | FITTING.md | OQ-FIT-001, OQ-FIT-005, OQ-FIT-007, OQ-GENR-003, PQ-001, PQ-003 |
| URS-FIT-002 | High | The objective function value shall agree with an independent calculation of the marginal likelihood. | FITTING.md §OFV | OQ-FIT-002, OQ-FIT-011 |
| URS-FIT-003 | High | Individual predictions shall agree with an independent calculation of the model. | FITTING.md | OQ-FIT-003 |
| URS-FIT-004 | Medium | All documented output files shall be written in NONMEM-compatible formats (.ext .phi .cov .cor .coi, control stream, predictions, parameter table, report). | FITTING.md | OQ-FIT-004 |
| URS-FIT-005 | Medium | The estimation methods (FO, FOCE, FOCE-I, Laplace, SAEM) shall run and agree with each other and with the truth within the expected method differences. | FITTING.md | OQ-FIT-005 |
| URS-FIT-006 | High | The same model written with analytic ADVANs, as a linear $DES (matrix exponential) and as a general ODE shall give the same objective function value. | FITTING.md | OQ-FIT-006, OQ-GENR-004 |
| URS-FIT-007 | High | Covariate effects written in $PK shall be estimated without bias. | FITTING.md | OQ-FIT-007 |
| URS-FIT-008 | Low | The fit options (--max-iterations, --no-cov-step, --carry-columns, --print-options) shall work as documented. | FITTING.md | OQ-FIT-008 |
| URS-FIT-009 | High | $OMEGA and $SIGMA blocks declared SAME shall repeat the preceding block exactly (tied estimates; a tied SIGMA starts at the value of its source); a SAME without a block of the same size to repeat shall be refused (exit code 5). | FITTING.md; THINGS_TO_KNOW.md | OQ-FIT-009 |
| URS-FIT-010 | High | Data items that are integers in NONMEM (EVID, MDV, CMT, SS, ADDL) shall be refused with exit code 7, naming the row, the column and the value, when they are not whole numbers; they shall never be truncated silently. | FITTING.md; QC-DATA.md | OQ-FIT-010 |
| URS-FIT-011 | High | A $PRED model shall treat every data column, including one named AMT, as an ordinary data item (no dose is created from it) and shall give the ordinary-least-squares solution of a linear regression. | FITTING.md | OQ-FIT-011 |
| URS-FIT-012 | High | Standard errors from the covariance step shall be exact for a model for which the information matrix is exact (linear regression): the closed-form values. | FITTING.md | OQ-FIT-012 |
| URS-FIT-013 | Medium | fit --ctls shall fit several control streams in turn with the result of a single fit, continue after a failure, print and write a table of the outcomes and report the failure in the exit code; combinations that make no sense for a batch shall be refused (exit code 2). | COMMANDS.md §4 | OQ-FIT-013 |
| URS-FIT-014 | Medium | A parameter that the objective function does not depend on shall be identified and warned about, and shall not prevent the standard errors of the other parameters. | FITTING.md | OQ-FIT-014 |
vpc (3)
| Requirement | Criticality | Statement | Reference | Tests |
|---|---|---|---|---|
| URS-VPC-001 | Medium | Predictive checks of a correct model shall agree with the observed data (observed percentiles inside the simulated intervals; observed fractions outside the prediction intervals close to nominal). | VPC.md | OQ-VPC-001, OQ-VPC-002, PQ-001 |
| URS-VPC-002 | Low | The VPC options (pcVPC, pvcVPC, NPC, stratification, binning) shall write their tables and plots. | VPC.md | OQ-VPC-003 |
| URS-VPC-003 | High | The observed percentiles per bin, the user-defined or equal-count binning, the proportional prediction correction and the NPC outside-flags of a VPC shall be correct. | VPC.md | OQ-VPC-004 |
cov (4)
| Requirement | Criticality | Statement | Reference | Tests |
|---|---|---|---|---|
| URS-COV-001 | High | The frozen-model covariate screen shall retain the covariates that influenced the data and reject those that did not. | COVARIATES.md | OQ-COV-001, PQ-001, PQ-002 |
| URS-COV-002 | High | The stepwise (scm), posterior and combined engines shall retain the true effects and reject the noise covariates. | COVARIATES.md | OQ-COV-002, OQ-COV-003 |
| URS-COV-003 | Medium | The covariate analysis shall record the SHA-256 of every input file. | COVARIATES.md | OQ-COV-004 |
| URS-COV-004 | High | The final model of the stepwise covariate search shall be the same model as an explicit fit of those covariate relationships (same objective function value, same exponents), independently of the reference value used for the covariate. | COVARIATES.md | OQ-COV-005 |
inspect/validate (2)
| Requirement | Criticality | Statement | Reference | Tests |
|---|---|---|---|---|
| URS-INS-001 | Medium | inspect shall parse the inputs and list the candidate scope without fitting; validate shall add artifact reconciliation and a base objective check. | COMMANDS.md §2-3 | OQ-INS-001, OQ-INS-002 |
| URS-INS-002 | High | validate shall judge the artifacts of a fit: a consistent fit shall pass; a fit whose objective function value is not reproduced shall get the verdict FAIL (exit code 0, with a clear notice) and an error with --strict (exit code 9). | COMMANDS.md §3 | OQ-INS-004, OQ-INS-005 |
posterior (1)
| Requirement | Criticality | Statement | Reference | Tests |
|---|---|---|---|---|
| URS-POS-001 | Low | posterior shall reconstruct the subject posteriors and write the shrinkage summary. | COMMANDS.md §4 | OQ-INS-003 |
forest (2)
| Requirement | Criticality | Statement | Reference | Tests |
|---|---|---|---|---|
| URS-FOR-001 | Medium | The forest plot ratios shall equal the covariate model evaluated at the stated covariate values. | FOREST.md | OQ-FOR-001 |
| URS-FOR-002 | High | Steady-state exposure ratios (AUC, Cavg) shall equal the closed-form ratios implied by the covariate effect on clearance. | FOREST.md | OQ-FOR-002 |
sims (5)
| Requirement | Criticality | Statement | Reference | Tests |
|---|---|---|---|---|
| URS-SIM-001 | High | Simulated steady-state exposure metrics of a model without variability shall equal the closed-form values (AUC = dose/CL, Cavg, Cmax, trough). | SIMS.md | OQ-SIM-001 |
| URS-SIM-002 | Medium | The simulation shall be controlled by the seed (reproducible; different seeds differ). | SIMS.md | OQ-SIM-002 |
| URS-SIM-003 | High | The summary statistics of the simulated exposure metrics (N, mean, SD, CV, geometric mean and CV, percentiles of type 7, minimum, maximum) shall be correct. | SIMS.md | OQ-SIM-003 |
| URS-SIM-004 | High | The pediatric population shall follow the CDC LMS weight-for-age method (also with a user-supplied table) and the dose rules (per kg, rounding, cap) shall be applied to the written weights. | SIMS.md | OQ-SIM-004 |
| URS-SIM-005 | Medium | A random-effects covariance matrix that is not positive (semi)definite shall be refused with exit code 9 and an explanation. | SIMS.md | OQ-SIM-005 |
power (5)
| Requirement | Criticality | Statement | Reference | Tests |
|---|---|---|---|---|
| URS-PWR-001 | Medium | The Fisher-information power analysis shall give standard errors that agree with the fitted ones for the same design and that scale with the inverse square root of the sample size. | POWER.md | OQ-PWR-001 |
| URS-PWR-002 | Low | The simulation-and-estimation method shall run and write its tables. | POWER.md | OQ-PWR-002 |
| URS-PWR-003 | High | The Wald power and the number of subjects for the target power computed from the information matrix shall equal the closed-form non-central chi-square results. | POWER.md | OQ-PWR-003 |
| URS-PWR-004 | High | The Fisher-information standard errors shall be exact for a linear model. | POWER.md | OQ-PWR-004 |
| URS-PWR-005 | Medium | The power analysis by Fisher information shall warn about the design features it does not model (compliance below 1, quantification limit) and record the warning. | POWER.md | OQ-PWR-005 |
er (4)
| Requirement | Criticality | Statement | Reference | Tests |
|---|---|---|---|---|
| URS-ER-001 | High | The exposure-response models shall recover the parameters of the generating model: continuous (Emax), binary (logistic), count (Poisson), time-to-event (Cox) and ordinal (proportional odds). | ER.md | OQ-ER-001, OQ-ER-002, OQ-ER-003, OQ-ER-004, OQ-ER-005 |
| URS-ER-002 | Low | Longitudinal exposure-response summaries shall be written. | ER.md | OQ-ER-006 |
| URS-ER-003 | High | The time-to-event analysis (Cox coefficient, log-likelihood, AIC, BIC with the number of events, Kaplan-Meier median, log-rank test) shall be correct. | ER.md | OQ-ER-007 |
| URS-ER-004 | Medium | The median and its distribution-free confidence interval in longitudinal exposure-response summaries shall be correct. | ER.md | OQ-ER-008 |
generate (2)
| Requirement | Criticality | Statement | Reference | Tests |
|---|---|---|---|---|
| URS-GENR-001 | Medium | generate shall write a complete project (data, control streams, fitted base model) of the requested structure and size, with every initial estimate inside its bounds, that can be re-fitted. | GENERATE.md | IQ-005, OQ-GENR-001, OQ-GENR-002, OQ-GENR-003, OQ-GENR-004, PQ-002, PQ-003 |
| URS-GENR-002 | Low | generate shall write the estimation record of the requested approximation (--approximation) and the goodness-of-fit plots on request (--gof-plots, only for fitted models; otherwise a usage error). | GENERATE.md | OQ-GENR-005, OQ-GENR-006 |
simulate-study (1)
| Requirement | Criticality | Statement | Reference | Tests |
|---|---|---|---|---|
| URS-STU-001 | Low | simulate-study shall run the operating-characteristics simulation and write its result tables and report. | SIMULATION_STUDY.md | OQ-STU-001 |
ask (3)
| Requirement | Criticality | Statement | Reference | Tests |
|---|---|---|---|---|
| URS-ASK-001 | High | The assistant shall refuse every command that breaks its guardrails (forbidden options, paths outside the permitted folders, numeric limits, self-start, non-nlmx programs) and run permitted commands only inside its session folder, with a complete transcript. | ASK.md §7, §9 | OQ-ASK-001, OQ-ASK-002, OQ-ASK-004, OQ-ASK-005 |
| URS-ASK-002 | Low | When no language model can be reached the assistant shall fail with exit code 3 and a hint. | ASK.md | OQ-ASK-003 |
| URS-ASK-003 | High | The assistant shall refuse a command whose settings file or control stream names a data file outside the folders the assistant may read. | ASK.md §7 | OQ-ASK-005 |
System (3)
| Requirement | Criticality | Statement | Reference | Tests |
|---|---|---|---|---|
| URS-SYS-001 | High | The installed program shall be the released version: identifiable, with a recorded SHA-256, running on the supported platform, on the validated reference data. | VERSIONING.md | IQ-001, IQ-002, IQ-003, IQ-005, IQ-007, IQ-008 |
| URS-SYS-002 | Medium | The program shall write its graphics (PNG/SVG) and documents on the installed platform. | README.md | IQ-006 |
| URS-SYS-003 | Low | The program shall handle a realistic study size within an acceptable time. | FITTING.md | PQ-003 |
4 Check types and comparison keys
Each test's checks list holds objects with a type and, for most types, a step (which step's output to examine), a file or glob, and a desc. Counts below are the number of times each type appears across the 118 tests.
| Group | Type | Counted | What it asserts |
|---|---|---|---|
| Exit and text | exit_code |
23 | the exit code of a step equals a value |
| Exit and text | stdout_contains |
94 | the console text contains a string |
| Exit and text | stdout_regex |
108 | the console text matches a regular expression |
| Exit and text | stdout_not_contains |
2 | the console text does not contain a string |
| Exit and text | stdout_not_regex |
2 | the console text does not match |
| Files | file_exists |
153 | a named file exists |
| Files | file_absent |
13 | a named file does not exist |
| Files | file_nonempty |
46 | a named file exists and is not empty |
| Files | glob_exists |
23 | a file pattern matches at least one file |
| Files | file_contains |
22 | a file contains a string |
| Files | file_regex |
43 | a file matches a regular expression |
| Files | file_not_contains |
6 | a file does not contain a string |
| Files | glob_regex |
38 | files matching a pattern match a regular expression |
| Files | file_starts_with |
2 | a file begins with given bytes (e.g., a PNG signature) |
| Files | zip_contains |
3 | a zip package (DOCX) contains a named part |
| Tables | csv_columns |
3 | a CSV has the named columns |
| Tables | csv_rows |
54 | a CSV has a number of rows (equals, min, max) |
| Tables | csv_value |
263 | one cell, selected by key columns, compared by equals, approx or regex |
| Tables | csv_column_stat |
12 | a statistic of a column (min, max, mean) lies in a band |
| Tables | csv_close |
2 | two CSV columns agree within a tolerance |
| Tables | ext_value |
52 | a parameter in an .ext file, compared with a value and a tolerance |
| Tables | json_value |
12 | a value in a JSON file |
| Integrity | checksums_verify |
88 | the output folder's checksums.sha256 verifies |
| Integrity | files_identical |
43 | two files are byte-identical |
| Integrity | dirs_identical |
3 | two folders have identical content |
| Human | manual |
8 | a human performs and signs a check |
Comparison keys used inside checks: equals; approx with rel_tol (relative) or abs_tol (absolute); min and max; regex. Any check can carry "negate": true: it must then not hold, which is how tamper detection is tested (page 42.13).
Step keys: nlmx (a command and its arguments), exec (an external helper script), copy/to (stage reference data), write (create a small file), expect_exit (the exit code the step is expected to end with, default 0), timeout, name (label in the record). Placeholders {data} (the controlled data folder) and {work} (the test's own folder) are resolved by the runner.
5 Independent calculators and helpers
All use only the Python standard library, so they run anywhere and share nothing with the program under test (page 42.5).
| Script | Purpose |
|---|---|
nlmx_validate.py |
The runner. list shows the tests; run executes them and writes the execution record (see the root README). Options: --nlmx, --tester, --section, --id, --label, --results, --timeout, --interactive, --no-keep-work, --allow-modified. Refuses to run when the package differs from its seal (unless --allow-modified, which is recorded as a deviation). |
seal_package.py |
--seal writes PACKAGE_MANIFEST.sha256 (after approval); --verify compares. |
build_protocols.py |
writes the human-readable PROTOCOL.md of every test folder from testcases.json. |
build_rtm.py |
writes the traceability matrix and URS.md; fails when a requirement has no test. |
verify_results.py |
proves that a 10_results/RUN_* folder is unchanged (manifest + register). |
make_summary_report.py |
writes the validation summary report from execution records. |
verify_checksums.py |
verifies the checksums.sha256 of any nlmx output folder (inspector's tool). |
check_input_manifest.py |
recomputes the SHA-256 of every input listed in an input_manifest.json. |
hash_snapshot.py |
snapshot / verify: SHA-256 of files and folders before/after a step. |
sha256sum.py |
portable sha256sum. |
verify_predictions.py |
independent one-compartment model: recomputes IPRED of a fit. |
verify_forest.py |
independent (x/x0)^β ratios for a forest plot, and the inverse ratios of the steady-state AUC and Cavg rows (--exponent-sign -1 --key-column VARIABLE). |
verify_er_glm.py |
independent logistic / Poisson regression (Newton–Raphson). |
verify_er_tte.py |
independent time-to-event analysis: Cox partial likelihood (Breslow), AIC/BIC, Kaplan–Meier median, log-rank. |
verify_median_ci.py |
independent median and distribution-free (order-statistic) interval of the longitudinal exposure-response summaries. |
verify_summary_stats.py |
independent N, mean, SD, CV, geometric mean/CV, type-7 percentiles, min, max of the sims summary tables. |
verify_peds_population.py |
independent CDC LMS z-scores (linear interpolation of L, M, S) and per-kg dose rules of a simulated paediatric population. |
verify_vpc_bins.py |
independent observed percentiles per bin, bin medians, prediction correction and NPC flags of a VPC. |
verify_wald_power.py |
closed-form Wald power and required sample size (non-central χ², 1 df) of the FIM power table. |
check_ext_relation.py |
relations between final estimates of .ext files: tied, starting value, nested-OFV order, lying between two estimates. |
check_scm_vs_fit.py |
the final model of the stepwise covariate search against an explicit fit (OFV and exponents). |
check_se_scaling.py |
FIM standard errors scale with 1/√N. |
check_theta_bounds.py |
every $THETA has lower ≤ initial ≤ upper. |
compare_numbers.py, compare_files_differ.py |
compare a value of two .ext files; assert that two files differ. |
tamper.py |
changes one bit of a file (tamper-detection test). |
interrupt_run.py |
starts a command and kills it after its first checkpoint (resume test). |
make_mix_model.py |
writes a control stream with an unsupported feature ($MIX). |
6 Reference data and where it is used
Controlled and sealed; produced without the program; rebuilt in memory and compared by make_reference_data.py --check (page 42.7).
| File | Used by | What it is, and its known truth |
|---|---|---|
pop_oral1.csv, pop_oral1.ctl |
fit, vpc, cov, forest, sims, power, screen, autoinit, eda, qc, PQ, data integrity | Reference population: 150 subjects, 10 samples each (1500 observations), one oral dose; truth CL 4 L/h, V 40 L, KA 1.2 /h, IIV (ω²) CL 0.09, V 0.04, proportional residual error variance 0.0225; body weight acts on CL (exponent 0.75) and on V (1.0); AGE, SEX, EGFR and NOISE are not in the model (NOISE is pure noise). |
pop_oral1_cov.ctl |
fit, vpc, forest, PQ | the same model with the weight effects estimated (THETA4 on CL, THETA5 on V) |
pop_oral1_des_linear.ctl, pop_oral1_des_ode.ctl |
OQ-FIT-006 | the same model as a linear $DES (solved by matrix exponential) and as a non-linear $DES (ODE solver) |
lik_check.csv/.ctl, lik_small_omega.ctl |
OQ-FIT-002 | 8 subjects, one ETA: the exact marginal −2 log-likelihood is obtained by numerical integration (independent of nlmx) and stored in expected_values.json |
pk_iv1_exact.csv |
nca | 4 individuals, noise-free one-compartment IV bolus: closed-form AUCinf, t½, CL, Vz, Vss, MRT, C0 |
pk_oral1_exact.csv |
nca | 3 individuals, noise-free oral profiles |
sims_det.ctl |
sims | model without any variability: closed-form steady-state exposure |
qc_dirty.csv |
qc-data | dataset with 12 seeded defects, one per individual |
bad_model.ctl, fixable_model.ctl |
qc-nm | control streams with known faults / safely fixable faults |
er_study.csv, er_*.er |
er | 1000 subjects with exposure and five response types simulated from known models; er_long.csv, er_longitudinal.er for the longitudinal analysis |
cov_frozen.covar, cov_posterior.covar, cov_both.covar |
cov, inspect, validate, posterior | settings of the covariate analyses (candidate list: WT, AGE, SEX, EGFR, NOISE on CL and V) |
lin_amt.csv/.ctl, lin_z.csv/.ctl |
OQ-FIT-011, OQ-FIT-012, OQ-PWR-004 | a linear regression written as a $PRED model (30 subjects × 6 rows = 180 observations, true intercept 1.5, slopes 0.8 and −0.3) whose data column is called AMT (a reserved NONMEM name; lin_z is the same data with the column called Z). The expected estimates, residual variance, OFV and standard errors are the ordinary-least-squares closed form computed from the written file (normal equations; OFV = n(ln(RSS/n)+1); SE = √(s²·diag((X′X)⁻¹))) |
pop_oral1_same.ctl, pop_oral1_sigma_same.ctl, pop_oral1_same_count.ctl, pop_oral1_same_orphan.ctl, pop_oral1_same_mismatch.ctl |
OQ-FIT-009 | the reference model with $OMEGA/$SIGMA blocks declared SAME (tied variances; six ETAs with SAME(2)) and two malformed uses (a SAME with nothing to repeat, a SAME after a block of another size) |
pop_oral1_evid_fraction.csv/.ctl, pop_oral1_addl_fraction.csv/.ctl |
OQ-FIT-010 | the reference data with one fractional EVID (0.9) and one fractional ADDL (1.5) |
pop_oral1_advan99.ctl |
OQ-FIT-013 | the reference model with an unsupported ADVAN99 (the failing member of a batch) |
pop_oral1_unused_theta.ctl |
OQ-FIT-014 | the reference model with a fourth THETA that no equation uses |
pop_oral1_indefinite_omega.ctl |
OQ-SIM-005 | $OMEGA BLOCK(2) with a correlation of 2 (not positive definite) |
pk_flat.csv |
OQ-NCA-007 | three nearly flat declining profiles at normal, large (3·10⁶ at t ≈ 1000) and tiny (10⁻⁹) scale; expected AUC/AUMC to the last sample computed with 80-digit decimal arithmetic from the closed-form integral of the log-linear interpolation (expected_values.json["pk_flat"]) |
cdc_test.csv |
OQ-SIM-004 | a small weight-for-age table in the CDC layout (Sex 1/2, Agemos 24/120/240, L, M, S) given to sims --cdc-table |
er_binary_outside.er, pop_oral1_outside_data.ctl |
OQ-ASK-005 | a settings file and a control stream whose data file lies outside the working folder (the test creates that file) |
ask_script_policy.json |
OQ-ASK-005 | scripted replies of the mock model: two commands that read outside the folder and one that does not |
report_sample.md |
report | Markdown with marker words, a table and a list |
ask_script_ok.json, ask_script_refused.json |
ask | scripted replies for the mock language model |
expected_values.json |
all | the independent expected values (closed forms, independent trapezoid sums, marginal likelihoods, true parameters, counted observations), each with its origin in _about |
make_reference_data.py |
— | the generator and the --check mode |
7 Exit-code fixtures
| Exit | Meaning | Fixture that provokes it | Test |
|---|---|---|---|
| 2 | invalid command-line usage | an option value outside its documented range; refused before anything is written | OQ-GEN-002, OQ-GEN-009 |
| 3 | discovery, files, output | a missing input file; an existing output folder without --overwrite |
OQ-GEN-003, DI-004 |
| 4 | invalid settings | an unknown method name; a settings file that is not valid TOML | OQ-GEN-003 |
| 5 | unsupported model or method feature | a control stream with $MIX; an ADVAN99 member of a batch |
OQ-GEN-003, OQ-FIT-013 |
| 6 | inconsistent model artifacts | qc-nm bad_model.ctl --fail-on error |
OQ-GEN-003, OQ-QCN-001 |
| 7 | data validation failure | qc-data qc_dirty.csv --fail-on error; a fractional EVID or ADDL |
OQ-GEN-003, OQ-QCD-003, OQ-FIT-010 |
| 9 | numerical or learner failure | $OMEGA BLOCK(2) with correlation 2; validate --strict on an altered record |
OQ-SIM-005, OQ-INS-005 |
| 11 | checkpoint or resume incompatibility | resume with no checkpoint; resume after a settings change |
OQ-GEN-003, DI-011 |
The full meaning of each exit code is Chapter 39; the design of negative tests is page 42.14.
8 Numbers at a glance
| Quantity | Value |
|---|---|
| Requirements | 90 (45 High, 31 Medium, 14 Low) |
| Risks | 42 (25 High, 13 Medium, 4 Low) |
| Tests | 118: IQ 8, OQ 96, PQ 3, data integrity 11 |
| Tests by risk class | 51 High, 41 Medium, 26 Low |
| OQ areas | 20 (one general and 19 command or feature areas) |
| Manual checks | 8 check items in 6 tests: IQ-003, IQ-008, OQ-ASK-004, OQ-CUS-003, OQ-EDA-003, OQ-REP-003 |
| Reference population | 150 subjects, 1500 observations; truth CL 4 L/h, V 40 L, KA 1.2 /h |
| Benchmark collection | 100 projects in 7 sets; 1043 s of fitting in total |
| Independent calculators | 16 verify_* and check_* scripts plus helpers, all standard-library Python |
Navigation
Back to the overview; the first page is 42.1 What validation means and the last is 42.17 Release gates. The hosted web apps built around the program are described in Chapter 43.