6.3 Numeric values, missing tokens and errors
Every kept control-stream data item must be numeric. nlmx accepts ordinary floating-point and scientific notation understood by its numeric parser. A non-numeric token in a kept column is a data error with the physical row, mapped column name and offending value.
Missing tokens have two views
An empty field, ., NA or NAN is missing. Configured missing codes can additionally mark covariate values such as -99 as missing. The model's numeric record stores a general missing item as zero, following the implemented NONMEM-oriented model view. Covariate screening separately stores missing as NaN so it can enforce an explicit missing policy.
This distinction is essential:
| Context | A . in a kept ordinary item |
|---|---|
| Model expression | numeric zero |
| Covariate baseline/screening value | missing, then policy applies |
| Standalone exploratory reader | retained as missing where the command supports it |
Do not use . for a model variable if zero is not the intended numerical behavior. For DV, observation status is controlled by EVID and MDV; a missing DV alone should not be treated as a complete censoring strategy.
Reserved defaults
When a reserved item is absent or missing, the reader uses explicit defaults: AMT, RATE, CMT, SS, II and ADDL default to zero. DV also has a zero numeric model value. EVID and MDV have inference rules described in Section 6.5.
Integers such as EVID, MDV, CMT and SS are read from numeric values and converted to integer fields. Supply integral values; relying on truncation of a decimal code is a data defect even if a parser accepts it.
Line-numbered failures
Examples of early failures include:
- fewer physical fields than the
$INPUTwidth; - a non-numeric value in a kept column;
- empty ID;
- missing or non-numeric
TIME; - an unsupported
EVIDorSSvalue; - dose attributes on a non-dose row.
The parser allows extra physical fields but marks those beyond $INPUT ignored. A short row is rejected because positional meaning cannot be recovered safely.
Assumptions and limits
The general control-stream reader does not attach a unit to a number. It also does not preserve a distinction between different missing spellings in the model's numeric vector. Retain the source if those spellings carry operational meaning.
Common mistakes
- Assuming a missing model item propagates as
NArather than zero. - Encoding categorical text in a kept
$INPUTcolumn. - Using decimal event codes.
- Treating a missing
DVas equivalent toMDV=1in every command. - Allowing short ragged rows in a positional dataset.
Checklist
- Every model-visible column is numeric or an accepted missing token.
- Missing codes are declared for covariates.
- Event codes are integral.
- Short rows and non-numeric errors were resolved at their original line.
- Missing
DV,MDVand BLQ coding form a documented policy.
Further reading
Section 6.5 defines record roles. Section 6.10 explains missing covariates without conflating them with the model's zero view.