skills/pkpd-modeling/references/dataset-standards.md
Regulatory submission data is CDISC. Modelling data is NONMEM-format. They are different shapes and converting between them is where most defects are introduced.
| Layer | Domain / dataset | Contents |
|---|---|---|
| SDTM | PC | Pharmacokinetic concentrations, as collected |
| SDTM | PP | Pharmacokinetic parameters (NCA output) |
| SDTM | EX | Exposure — what was actually administered |
| ADaM | ADPC | Analysis-ready concentrations |
| ADaM | ADPP | Analysis-ready parameters |
| — | NONMEM dataset | One row per event, wide covariates, numeric only |
Useful SDTM PC variables: PCTESTCD/PCTEST (analyte), PCORRES/PCSTRESN (result as collected
and standardised), PCSTRESU, PCLLOQ, PCTPT/PCTPTNUM (nominal time), PCDTC (actual
date/time), PCSPEC (matrix). PP parameters use the CDISC PKPARM/PKUNIT controlled
terminology — AUCALL, AUCIFO, AUCIFP, CMAX, TMAX, LAMZ, LAMZHL, CLFO, VZFO.
Nominal versus actual time is the single most consequential conversion decision. NCA and population modelling should use actual elapsed time from the most recent dose. Using nominal time flattens the absorption phase, biases Cmax and Tmax, and inflates residual error. Nominal time is for grouping and presentation only.
| Item | Meaning | Traps |
|---|---|---|
ID | Subject | Must be numeric and contiguous per subject; records for one subject must be together |
TIME | Elapsed time | Must be non-decreasing within a subject. Use one unit consistently |
DV | Dependent variable | Must be numeric. See below |
AMT | Dose amount | On a dose record only; units must match the model's |
EVID | Event ID | 0 observation, 1 dose, 2 other, 3 reset, 4 reset+dose |
MDV | Missing DV | 1 means the record contributes nothing to the objective function |
CMT | Compartment | Which compartment is dosed or observed |
RATE | Infusion rate | >0 a rate; -1 model-estimated duration; -2 model-estimated rate |
SS | Steady state | 1 = achieve steady state before this dose; requires II |
II | Interdose interval | Required by both SS and ADDL |
ADDL | Additional doses | n further doses every II; silently does nothing without II |
These are the reason check_popk_dataset.py exists. None of them raises an error in NM-TRAN.
DV. BLQ, <LLOQ, ND are read as 0 and fitted as genuine zero
concentrations. This is the most damaging defect in the list, and it is invisible.. in a WT column becomes a 0 kg patient in the
covariate model. Missing covariates must be imputed explicitly and the imputation documented, or
the subject excluded.ADDL without II. No additional doses are placed. Exposure is understated by the whole
accumulation.SS without II. Same class of failure.TIME are applied in file
order, so whether the sample is pre- or post-dose depends on row order. Order dose records
before observations at the same time, or offset the observation by a small negative amount.TIME within a subject. NONMEM does not sort for you.RATE left on an oral record, turning first-order absorption into a zero-order infusion.Keep the numeric DV and add a separate flag:
ID,TIME,DV,AMT,EVID,MDV,BLQ,LLOQ
1,0,.,100,1,1,0,0.5
1,1,4.21,.,0,0,0,0.5
1,24,0.5,.,0,0,1,0.5 <- DV set to LLOQ, BLQ flag set, method chosen in the control stream
Then implement the chosen method (usually M3) in the model rather than by editing the data. See
population-pk.md for the M1-M7 comparison.
Every population analysis dataset should ship with a specification listing, per column: name, label, type, units, derivation (including the source SDTM/ADaM variable), permissible values, and the missing-data rule. This is the document a reviewer reads first, and producing it usually surfaces at least one defect on its own.
A reproducible derivation script from the ADaM datasets to the modelling dataset is worth more than the dataset itself: it is what makes a re-run possible after a database lock update.