6.5 EVID, MDV and CMT
Three data items determine whether a row contributes an observation and what event surrounds it. nlmx treats a row as an observation only when EVID=0 and MDV=0; it treats EVID=1 and EVID=4 as dose events.
Figure 6.4. A physical row becomes an observation, dose, reset or other event only after column mapping, numeric parsing and joint interpretation of the record flags. Cross-software QC should compare this interpreted class.
Event matrix
Table 6.1. Core event interpretation in nlmx 4.3.0
| EVID | Meaning | May carry dose attributes? | Observation likelihood? | Reset? |
|---|---|---|---|---|
| 0 | observation candidate | no | yes when MDV=0 |
no |
| 1 | dose | yes | no, even if MDV=0 |
no |
| 2 | other event | no | no | no |
| 3 | reset | no | no | yes |
| 4 | reset then dose | yes | no | yes |
Values outside 0–4 are rejected. AMT, RATE, SS, II and ADDL must be zero on EVID 0, 2 and 3 rows. A dose with zero AMT is rejected except for the supported steady-state constant-infusion form (SS>0, positive RATE).
Inference when columns are absent
When kept EVID is absent or missing, nlmx infers:
- dose (
1) ifAMTis nonzero, or for a steady-state constant infusion; - other event (
2) ifMDVis nonzero; - observation (
0) otherwise.
When kept MDV is absent or missing, it defaults to 0 for EVID 0 and 1 for every other EVID. A dose row coded MDV=0 produces a warning and still carries no observation.
Explicit columns are easier to audit. In comparison work, avoid relying on inferred EVID/MDV unless the reference program is configured to infer them identically.
Compartment selection
CMT selects the dosing compartment on a dose record and the observation compartment on observation/other-event records. Zero means use the model's default dose or observation compartment. A dose cannot target the model's output compartment, and a dose row cannot have negative CMT.
On an other-event record, negative CMT can turn off the output compartment and reset that output accumulator. nlmx 4.3.0 does not support turning off arbitrary state compartments this way. This feature is specialised; test it with the exact model before relying on it.
CONT and L2
A nonzero CONT continuation record is refused; write each event on one row. A nonzero L2 is read but produces a warning: nlmx treats observations as conditionally independent and does not implement NONMEM's within-record-group EPS correlation implied by L2.
Assumptions and limits
The table describes dataset classification. The model engine still determines the state update, scaling and prediction. Chapter 8 will document those mechanics.
Common mistakes
- Coding a dose with
EVID=0and nonzeroAMT. - Expecting
MDV=0to turn a dose row into an observation. - Putting
ADDLorIIon an observation row. - Assuming negative CMT can turn off any compartment.
- Using L2 without recognising that its correlation is not modelled.
Checklist
- Every row has an intentional EVID role.
- Observations use EVID 0 and the intended MDV.
- Dose attributes occur only on EVID 1 or 4.
- CMT values match model compartments and scaling.
- CONT and L2 limitations were checked.
Further reading
Section 6.6 expands dose delivery. Chapter 8 will connect these records to state transitions and model predictions.