General linear model

Recall that NONMEM supports general linear ODE model $$ \frac{dA(t)}{dt}=K^TA(t). $$

Here \(K\) is a \(n\times n\) matrix that could depend on \(x\). \(K(i, j)\) quantifies the first-order distribution of drug from compartment number i to compartment number j. NONMEM provides ADVAN5 and ADVAN7 for this type of model. In particular, ADVAN7 targets problems in which \(K\) has real eigenvalues, suitable for most PK applications.

In $PK block, reserved variable Kmn denotes the rate constant that quantifies the first-order distribution of drug from compartment number m to compartment number n is Kmn. The variable Km0 may be used instead of Kmn, where n is the number of the output compartment. When the number of compartments exceeds 10, the syntax Kmn=k may be ambiguous. The letter T may be used to separate the two compartment numbers KmTn. The rate constants are numbered (these numbers are used internally by the ADVAN) according to the order in which they appear in the abbreviated code.

See $MODEL record for a description of compartment numbering.

In the following example we use ADVAN7 to replicate the one-compartment model ADVAN2.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
$PROB THEOPHYLLINE POPULATION DATA
$INPUT ID DOSE=AMT TIME CP=DV WT
$DATA THEOPP
$SUBROUTINES ADVAN7
$MODEL COMP=(DEPOT,INITIALOFF,DEFDOSE) COMP=(CENTRAL,DEFOBS,NOOFF)
$PK
;THETA(1)=MEAN ABSORPTION RATE CONSTANT (1/HR)
;THETA(2)=MEAN ELIMINATION RATE CONSTANT (1/HR)
;THETA(3)=SLOPE OF CLEARANCE VS WEIGHT RELATIONSHIP (LITERS/HR/KG)
;SCALING PARAMETER=VOLUME/WT SINCE DOSE IS WEIGHT-ADJUSTED
CALLFL=1
K12=THETA(1)+ETA(1)
K20=THETA(2)+ETA(2)
CL=THETA(3)*WT+ETA(3)
S2=CL/K20/WT
$THETA (.1,3,5) (.008,.08,.5) (.004,.04,.9)
$OMEGA BLOCK(3) 6 .005 .0002 .3 .006 .4
$ERROR
Y=F+EPS(1)
$SIGMA .4
$EST MAXEVAL=450 PRINT=5
$COV
$TABLE ID DOSE WT TIME
  • CALLFL=1 indicates $PK block is only evaluated once per subject, at the first record of each subject.
  • Subscript "0" for K is for output compartment, thus \(K_{20}\) is the rate of drug transport from central to a virtual output compartment, representing elimination rate constant.
  • The use of the DEFDOSE attribute on the following $MODEL record specifies that if the CMT data item is null on a given dose event record, then the dose(s) specified by that record are to be placed in the depot compartment. The use of the INITIALOFF attribute specifies that the depot compartment is to be off until a dose is placed in it.
  • The use of the DEFOBS attribute on the $MODEL record specifies that if the CMT data item is null on a given observation event record, then the quantity F which is available as a right-hand quantity in $ERROR is to be the scaled drug amount in the central compartment.

Similarly, we can use ADVAN7 to implement a three-compartment model with first-order absorption, where elimination occurs from a central compartment and one of two peripheral compartments.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
$PROBLEM EXAMPLE OF A THREE COMPARTMENT MODEL WITH ABSORPTION
$INPUT ID TIME AMT DV CMT
$DATA datafile
$SUBROUTINES ADVAN7
$MODEL COMP = (DEPOT,DEFDOSE,INITIALOFF)
COMP = (CENTRAL,DEFOBS)
COMP = PERIPH1, COMP = PERIPH2
$PK
;# There are other reasonable ways that ETAs can be assigned.
;# Elaborate these expressions for the K’s as is appropriate.
K12 = THETA(1)*EXP(ETA(1))	;#  depot to central
K23 = THETA(2)			;#  central to periph1
K32 = THETA(3)			;#  periph1 to central
K30 = THETA(4)*EXP(ETA(2))
K24 = THETA(5)			;#  central to periph2
K42 = THETA(6)			;#  periph2 to central
K20 = THETA(7)*EXP(ETA(3))	;#  elimination from central
S2  = THETA(8)*EXP(ETA(4))	;#  scale for central
;# ...

Other parameterizations are possible, as long as the above set of micro-constants is defined, e.g., the definitions of K20 and S2 can be replaced by the following.

1
2
3
4
CL = THETA(7)*EXP(ETA(3))
V = THETA(8)*EXP(ETA(4))
K20 = CL/V
S2 = V