12.8 $DATA and selection checks: DAT01–DAT10
DAT01 resolves the dataset. DAT02 asks whether IGNORE skips the header. DAT03 validates IGNORE/ACCEPT labels/operators and forbids incompatible mixing. DAT04 enforces condition count. DAT05 checks dataset CMT against model compartments; DAT06 field width against $INPUT.
DAT07 reports records/individuals read after selection. DAT08 finds unskipped nondata lines. DAT09 warns that .EQ./.NE. compare text (0 differs from 0.0); DAT10 checks that each condition selects something and observations remain.
Text versus numeric comparisons
Default ignore_numeric can replace .EQ./.NE. with .EQN./.NEN. when numeric text mismatch would matter. This can change which rows enter analysis, so review counts and line-level selection before approval.
Header correction
Default ignore can change IGNORE=# to IGNORE=@ when the header begins with letters. Inspect every other letter-leading line: IGNORE=@ may also skip notes or malformed records.
Reconcile selection with a small ledger
For each IGNORE or ACCEPT clause, record its text, the number of rows it matches, and several example line numbers. Then calculate the cumulative result in the same order NONMEM applies it. Compare total records, unique IDs, dose records, observations, and MDV/EVID categories before and after selection. DAT07 supplies useful counts, but counts alone cannot reveal that the wrong subjects were retained. DAT10's “selects something” check likewise does not prove that the selected records are the intended ones.
DAT05 deserves a model-aware review: a CMT value may be numerically within range but point to the wrong compartment after a $MODEL edit. DAT06 only checks that enough fields exist; it cannot confirm that later columns have the correct meanings or units.
Common mistakes
- Checking that conditions parse but not what they select.
- Changing IGNORE without comparing retained counts/IDs.
- Assuming CMT validity from integer range alone.
- Ignoring a condition that selects zero rows.
Checklist
- Resolve exact dataset and delimiter.
- Test selection condition by condition.
- Reconcile retained subjects/observations.
- Compare CMT with model compartments.
Further reading
See NONMEM readiness, input/data corrections and worked IGNORE correction.