Documentation

B.3 Terms of the data and the control stream: records, events, censoring and files

A dataset read row by row

What you will learn

  • Read a NONMEM-format dataset row by row: which rows are doses, which are observations, which are ignored.
  • Know the event types (EVID), the missing-DV flag (MDV), the compartment (CMT) and the dosing-schedule columns.
  • Say how a value below the limit of quantification is represented, and what the two usual treatments do to the likelihood.
  • Name the sections of a control stream and the result files a run leaves behind.

Prerequisites: B.1. The working detail is in Chapter 5, Chapter 6, Chapter 11 and Chapter 12.

The dataset

A dataset is a table with one row per record and one column per variable. The rows are time-ordered within each subject. A row is either an observation, a dose, or an other-type event.

  • ID — the subject identifier; all rows of one subject share it and are contiguous.
  • TIME — the time of the record, in the unit the model uses (usually hours). TAD (time after the most recent dose) and TSFD (time since first dose) are derived times used in plots and NCA.
  • DV — the dependent variable: the measured value on an observation row, and a placeholder (a dot or zero) on a dose row.
  • AMT — the dose amount; zero or missing on an observation row. RATE — an infusion rate (or a code that asks the model to supply one); an infusion lasts \(\mathrm{AMT}/\mathrm{RATE}\).
  • EVID (event identifier) — what the row is: 0 an observation, 1 a dose, 2 an other event (a record that changes a covariate or a state but is not a dose), 3 a reset of the subject's compartments, 4 a reset followed by a dose.
  • MDV (missing dependent variable) — 1 if the row has no usable observation, 0 if it does. A dose row has MDV \(=1\).
  • CMT (compartment) — the compartment the dose enters or the observation is taken from.
  • II (interdose interval) and ADDL (additional doses) — a compact way to write a repeated regimen: one row with \(\mathrm{ADDL}=n\) and \(\mathrm{II}=\tau\) stands for \(n\) further doses every \(\tau\).
  • SS (steady state) — a flag that tells the model to start the row at steady state for the regimen given by II.
  • Covariate column — a variable that does not appear in the dose-response equation directly but is used by the model (weight, creatinine clearance, sex, study arm).
  • Time-constant and time-varying covariate — one value per subject, or a value that changes at the rows where it is measured. Between measurements, a time-varying covariate is carried forward from the last row (last observation carried forward), unless the model says otherwise.
  • Header — the first row, with the column names; comment character — a leading character that marks a row to be ignored; IGNORE — a rule in the control stream that skips rows that meet a condition.
  • Flagged row — a row that a data check has reported. Where: Chapter 11.

Below the limit of quantification

  • LLOQ (lower limit of quantification) — the lowest concentration the assay measures with acceptable accuracy. BLQ (below the limit of quantification) — an observation reported as lower than that.
  • A BLQ value is censored: the true value is known only to lie below the limit. Treating it as a measured number (or as zero) biases the model.
  • M1 — discard BLQ observations. Simple, and biased when many observations are BLQ.
  • M3 — keep the observation and use its probability of being below the limit in the likelihood. For a Gaussian residual with prediction \(F\) and residual SD \(W\), the contribution of a censored observation is \(-2\log\Phi\bigl((\mathrm{LLOQ}-F)/W\bigr)\) (page A.7).
  • Censored fraction — the share of observations that are BLQ; a reason to prefer M3 when it is more than a few per cent.

The control stream

A control stream is the text file that describes a model. It is made of records that begin with a dollar sign. The common ones:

Record What it holds
$PROBLEM a title for the model
$INPUT the names of the dataset columns, in order
$DATA the dataset file, and rules for rows to ignore
$SUBROUTINES the model library to use (the ADVAN number) and the parameterisation (the TRANS number)
$PK the individual parameters from THETA, ETA and covariates
$ERROR the residual error model
$THETA, $OMEGA, $SIGMA the initial estimates, bounds and structure of the fixed effects, the random-effect covariance and the residual variance
$ESTIMATION the method and its options
$COVARIANCE request for the covariance step
$TABLE the columns to write to a table

The nlmx data and control-stream checks read these records; see Chapter 12. A model statement or feature that the program does not support stops a run with a clear message and exit code 5, never a silent substitution (page D.3).

  • ADVAN — a built-in structural model (for example a one- or two-compartment model with first-order absorption). TRANS — the choice of parameterisation of that model (clearances and volumes, or rate constants).
  • THETA, ETA, EPS — the names used in $PK and $ERROR for the fixed effects, the random effects and the residual random effects.
  • Block OMEGA and diagonal OMEGA — a covariance block that estimates the correlations among the random effects, or a diagonal that does not. FIXED — an element held at its initial value.
  • Initial estimate — the value written in $THETA, $OMEGA or $SIGMA, where the search starts, optionally with a lower and upper bound.

The files of a run

  • Listing (.lst) — the human-readable report of a run. Extension file (.ext) — the parameter values at each iteration, and the final estimates and objective. Individual-estimates file (.phi) — each subject's random effects and the objective function contribution. nlmx reads files of these kinds from a NONMEM run and writes files of the same kinds (Chapter 5).
  • Settings file — the file of a command's options. Each command has its own extension; the table lives in one place (page D.4).
  • Output folder — everything one run writes: the listing, the tables, the figures, the echo of the settings in force, the transcript and a checksum list (Chapter 38).

A worked example

Illustration, not a study result. Five rows from one subject of the dataset of the appendix subject (100 mg intravenous, three concentrations):

ID TIME AMT EVID MDV CMT DV
1 0 100 1 1 1 .
1 1 . 0 0 1 4.6
1 4 . 0 0 1 2.9
1 12 . 0 0 1 1.0
1 24 . 0 0 1 <0.5 → BLQ

Reading it: row 1 is a dose (EVID 1, MDV 1, no DV); rows 2–4 are observations (EVID 0, MDV 0) of the central compartment; row 5 is an observation reported below an LLOQ of 0.5 mg/L. Under M1 the fifth row is dropped; under M3 it stays, with the contribution \(-2\log\Phi\bigl((0.5-F)/W\bigr)\). With the typical prediction \(F(24)=5e^{-0.2\times24}=0.04\) mg/L and a proportional residual SD of 0.2, the SD is tiny, so the censored row contributes almost nothing; a model that predicted \(0.8\) mg/L at that time (\(W=0.16\)) would contribute \(-2\log\Phi(-1.875)=7.0\). That is the information a dropped row throws away.

Review checklist

  • For any row, can you say whether it is a dose, an observation or an other-type event from EVID and MDV?
  • Do you know how BLQ values are treated in your analysis, and why?
  • Can you name the control-stream record that sets the structural model, the individual parameters and the residual error?
  • Do you keep the settings echo and the checksum list with the output of every run?

See the previous page, the overview and the next page, covariates, evaluation and design.