$BIND

Define which data record's value to use for a data item when the item is used in $PK, $DES, and $AES.

1
2
;# Usage
$BIND  value ...

Discussion

NONMEM processes data by event record as well as additional state times. The time domain in a NONMEM model is discretized according to these times. One example of non-event state times is the termination time of an infusion. Another example is the time when a dose actually enters the system, when there is an absorption lag.

Unless modeled specifically, NONMEM assumes piece-wise constant value for user-specified data items used by $PK: in a given state time interval \(t_{j}, t_{j+1}\), the data item used by $PK is constant and adopts its value at \(t_{j+1}\). This is referred to as "Next Observation Carried Backwards" (NOCB): the system advances from \(t_j\) to \(t_{j+1}\) using parameter values at \(t_{j+1}\). The intrinsic data items, such as ID, DV, AMT, RATE, etc., are not affected by this behavior.

For example, consider the following records

1
2
3
TIME  WT
40    70
50    72

NONMEM would use WT values as the following:

  • \(t=40\): WT=70;
  • \(t \in (40, 50]\): WT=72;

A dummy record can be used to to force the "Last Observation Carried Forward" (LOCF) behavior:

1
2
3
4
TIME  WT
40    70
50    70
50    72

This default behavior could be problematic. For example, consider

1
2
3
4
  TIME AMT PREP    X
    0  100    4    .
   10  100    1   90
   20    0    0   80

To encode different bioavailability for different preparation PRED, it is tempting to do

1
2
3
4
5
6
 $INPUT ID TIME AMT DV PREP X
 $PK
     F1=1
     IF (PREP.EQ.4) F1=THETA(3)
     ALAG1=THETA(5)
     CL=THETA(1)*X*EXP(ETA(1))

so that THETA(3) describes F1 for PREP=4, at \(t \in [0, 10)\). However, with ALAG1 the actual administration time of the first dose could be at \(t\in (0, 10]\) or \(t \in (10, 20)\), corresponding to PREP=1 or PREP=0, repectively, according to NOCB. This leads to incorrect F1. Moreover, since the line of F1=THETA(3) will never be run, the Estimation step will produce zero gradient for THETA(3).

A similar problem will occur when modeling data records

1
2
3
4
  TIME AMT PREP    X  II  ADDL
    0  100    4    .   5     1
   10  100    1   90   5     1
   20    0    0   80   .     .

with

1
2
3
4
5
  $INPUT ID TIME AMT DV PREP X II ADDL
  $PK
      F1=1
      IF (PREP.EQ.4) F1=THETA(3)
      CL=THETA(1)*X*EXP(ETA(1))

In this case THETA(3) applies only to the first dose when PRED=4.

The optional $BIND record overrides the default NOCB behavior, when there are time-varying data items utilized at additional doses or lagged doses through CALLFL=-2. In other words, $BIND is effective only when $PK is used on non-event dose times. It has no effect at other times, including when PK is called at a model event time (MTIME).

Options

Given successive state times \(t_d \le t_1 \le t_a \le t_2\), for a dose event at \(t_d\), followed by another event at \(t_1\), then a non-event dose such as from ADDL and ALAG, and at last another event at \(t_2\), $BIND provides the following options for a time-varying data item \(x\):

  • DOSE: use x=x(t_d) within interval \(t_1, t_2\);
  • LAST: use x=x(t_1) within interval \(t_1, t_2\);
  • NEXT (default): use x=x(t_2) within interval \(t_1, t_2\);
  • DROP | SKIP: ignore \(x\).
  • -: a place holder, \(x\) assumes either NONMEM intrinsic data item value or default behavior.

$BIND may not specify a position beyond the last position defined via $INPUT. It may specify fewer positions, and the remaining data items assume default behavior.

Examples

A $BIND record with all defaults specified, such as

1
$BIND - - - - - - -

is equivalent to no $BIND record.

1
2
 $INPUT ID TIME DATE=DROP AMT DV WGT  PREP  X   HGT
 $BIND   -   -    DROP     -   - NEXT DOSE LAST  -

ID, AMT, DV have the values from the initiating dose record. TIME has the value from the next event record. WGT and HGT have values from the next event record. PREP has the value from the initiating dose record. X has the value from the previous event record.

$INPUT and $BIND records can be interleaved to help maintain a visual relationship. The above example could have been coded:

1
2
3
4
   $INPUT ID TIME DATE=DROP
   $BIND   -   -    DROP
   $INPUT AMT DV  WGT PREP X    HGT
   $BIND  -   -  NEXT DOSE LAST  -

The two above examples with problematic F1 can be corrected by using $BIND and CALLFL=-2:

1
2
3
4
5
  $INPUT ID TIME AMT DV PREP X II ADDL ;# II & ADDL only in the 2nd example
  $BIND   -    -   -  - DOSE NEXT
  $PK
      CALLFL=-2
      ;#...

CALLFL=-2 requires additional calls to PK at the non-event dose times. $BIND requests PREP assume value from the initiating dose record, e.g. PREP=4 at \(t=5\), PREP=1 at \(t=15\)). F1 is then computed correctly for the dose preparation. X still assumes values from the next event record, so the computation of CL is unchanged,

A more verbose alternative to $BIND is to utilize reserved variables. DOSTIM, DOSREC, and EVTRES. DOSTIM=0 when PK is called with an event record, and DOSTIM has the implied dose time when PK is called at an additional or lagged dose time; DOSREC stores the data items at the initiating dose record; EVTREC stores the data items at the next event record. Therefore, the default NOCB behavior implies in each PK call

  • NONMEM data items

    1
    2
    
    DV MDV ID L2 MRG_ RAW_ REPL_ EVID AMT RATE SS II CMT  PCMT  CALL  CONT
    ADDL DATE DAT1 DAT2 DAT3

    have values from the original dose event record DOSREC;

  • TIME and all user-defined data items have the values from the next event record EVTREC.

Using the above variables on can emulate $BIND behavior for a data item X by copying X at different times as follows.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
  ;! DOSE:
  IF (DOSTIM.EQ.0) THEN
     XB=X
  ELSE
     XB=DOSREC(X)
  ENDIF

  ;! NEXT:
  XB=X

  ;! LAST:
  IF (DOSTIM.EQ.0) THEN
     XB=X
  ENDIF