20.10 Compartments, observation routing, and resets
CMT on dose records selects the receiving compartment; CMT on observations selects the output/prediction compartment where supported. Defaults come from ADVAN/control-stream definitions. Output compartments may use n+1 or 1000 (for example urine). Negative CMT can reset an output compartment.
Mixed oral/IV data rely on correct dose compartments. S1, S2, etc. scale amounts into predictions. A wrong scale can produce plausible-shaped but wrong-unit concentrations and distort parameter estimates.
Test compartment routing with a designed dataset containing each dose/observation CMT, reset and output collection. Confirm state before and after same-time events. Do not rely only on typical concentration observations.
A compartment audit
Create a table for every compartment: number, name, state unit, dose eligibility, observation eligibility, initial condition and reset behavior. Reconcile that table with $MODEL, CMT values in data and the prediction returned by $ERROR or $PRED. Never assume that a familiar ADVAN uses the same user-facing numbering as a previous project.
For multi-analyte or parent–metabolite data, confirm that each observation routes to the correct prediction and error model. Test one record for each CMT at a fixed parameter vector. If a compartment is declared but never dosed, observed or connected dynamically, determine whether it is intentional.
Reset events must be tested around their exact time. Compare states immediately before reset, after reset and after any simultaneous dose. A reset can erase accumulated drug or random state in ways that dramatically affect multiple-dose predictions. Document whether covariates and model variables persist through the reset.
Common mistakes
Do not assume CMT means the same number across ADVANs, place oral dose directly central unintentionally, or forget output-compartment reset. Scaling belongs to observation calculation, not dose amount unless specified.
Checklist
- Document compartment map/defaults.
- Verify every dose/observation CMT.
- Check S scaling/units.
- Test reset/output behavior.
- Align with NONMEM reference.
Further reading
See analytic models, event history, and Chapter 8.