43.8 QC: verdicts on data and model code
What you will learn
- What QC checks, and what its verdict means.
- How the 24 automatic corrections of a control stream work.
- How to use the planted-problem example sets to learn what the checks catch.
Finding mistakes before they become results
A wrong dose record or a missing covariate can change a model without any warning. QC gives a verdict you can act on, for the dataset and for the model code.
Two commands, one app
qc-dataruns 99 checks in 10 categories on a NONMEM dataset: file and format, header and column names, values and data types, records and NONMEM data items, time, dosing, observations, individuals, covariates, and NONMEM readiness.qc-nmruns 81 checks on a control stream (file, records,$INPUT,$DATAand the dataset,$SUBROUTINESand$MODEL, abbreviated code,$THETA,$OMEGAand$SIGMA,$ESTIMATIONand$COVARIANCE,$TABLE, and documentation), of which 24 can be corrected automatically.
Run one on its own, or run both together. With Both, the control stream check is given the dataset, so $INPUT, CMT values and IGNORE or ACCEPT clauses are cross-checked against the file.
Using it
- Drop a dataset and, or, type, paste or open a control stream. A NM-TRAN-aware editor highlights it, and the dataset is browsable with every row before you run.
- Set options in collapsible panels: columns, covariates, groups, LLOQ, filters, delimiter, flagged copy and figures; for control streams, the NONMEM version and which corrections may be made; the severity (error, warning, comment, off) of each of the 180 checks; and the thresholds of the settings files.
- Press Check. The log streams live and the command preview shows what runs.
The verdict
QC reports one of three verdicts:
- NOT READY: at least one check failed.
- READY WITH WARNINGS: no failures, but warnings to review.
- READY: all clear.
For control streams the verdict is also given after the fixes, so you can see whether the automatic corrections clear the failures.
What you see
- A checklist with status, category and text filters.
- Every finding, paged, and for a control stream a link to the line.
- The tables nlmx writes: columns, subjects, dosing, covariates, parameters, covariate distributions and the covariate correlation.
- Figures, and the self-contained nlmx report.
- For
qc-nm, each correction with before and after, the unified diff, and the corrected<stem>_qc.ctl.
Your original is never changed. Corrections go to a new file, with the evidence beside it.
What the checks look at
The dataset checks follow the model of NONMEM records: time order and negative times, dosing records with missing or zero amounts, observations with doses, repeated doses, ADDL/II use, BLQ coding, concentrations outside plausible ranges, individuals with no doses or no observations, and covariates that are missing, outside ranges, implausible in units, inconsistent with derived values such as BMI and BSA, collinear, or changing within an individual. The control stream checks match $INPUT to the dataset, CMT to the model, IGNORE and ACCEPT to the columns, initial estimates and bounds, OMEGA and SIGMA structure, $ERROR code, and the estimation and table records.
Compare two runs
Previous runs can be expanded and compared: counts by verdict, checks that changed verdict, findings only in A or only in B, tables, figures and control stream differences. The classic use is QC before and after a fix: the comparison proves what changed.
Example library with an answer key
Six simulated datasets, each with control streams and suggested options. Two are QC sets with planted problems (six warnings in one, 36 problems in the other). Their results get an Answer key tab that sets each planted problem next to what nlmx reported at that line, so a new analyst can see exactly what the checks catch.
Using QC as a gate
A good habit is to make a clean QC run a precondition for modelling. In One in nlmx the QC run can be tagged Reviewed, and the dataset that produced a Final model can always be traced to the QC that approved it.
Navigation
See the previous page, next page, and the chapter overview.