How to compute AUC and Cmax in Monolix

 





Often the Area under the PK curve (AUC) is needed as an important PK metric to link with the pharmacodymanic effect. We show here how the AUC can be computed within the mlxtran model file and be outputted for later analysis.

In the EQUATION section of the Mlxtran model you can use the following code. It is the basic implementation of the AUC for a 1-compartmental model with absorption rate ka. It will compute the AUC from the start to the end of the integration.

Notice that the calculation can be used as an output (to be matched to observations of the data set) and thus in the output={} definition, or just computed and available for post-treatment using table={} as can be seen here.

 

AUC for t=0 to t=tend and fast computation with linear ODE

input = {ka, V, Cl}

PK:
compartment(cmt=1, amount=Ac, volume=V, concentration=Cc)
elimination(cmt=1, Cl)
oral(ka, cmt=1)

EQUATION:
odeType = linear
ddt_AUC = 1/V * Ac

OUTPUT:
output = {Cc}
table = {AUC}

Time interval AUC

If you want to limit the computation of the AUC to a time period you can use the following code:

input = {ka, V, Cl}

PK:
depot(ka, target=Ac)

EQUATION:
odeType=stiff

Ac_0 = 0
ddt_Ac = -Cl/V*Ac
Cc = Ac/V

AUC50_0 = 0
if(t < 50)
dAUC50 = 1/V * Ac
else
dAUC50 = 0
end
ddt_AUC50 = dAUC50

AUC100_0 = 0
if(t < 100)
dAUC100 = 1/V * Ac
else
dAUC100 = 0
end
ddt_AUC100 = dAUC100

AUC50_100 = AUC100 - AUC50

OUTPUT:
output = {Cc}
table = {AUC50_100}

Note that the t==tDose would not work because the integrator does not necessarily evaluate the time exactly at the times of doses. Thus the test t==tDose might not be tested at all during the computation.

 

Fast computation with linODE and dose interval AUC (AUCtau)

In many cases the mlxtran code above will be sufficient. For cases where you need fast execution you use a special solver for linear ODE systems by specifying odeType = linear in the EQUATION section. This does not work with if statements and you will need to use the code below. In this code the AUC is computed for each dose interval. Thus, at each dose the AUC is set to zero and the concentration is integrated until the next administration.

input = {ka, V, Cl}

PK:
compartment(cmt=1, amount=Ac, volume=V, concentration=Cc)
elimination(cmt=1, Cl)
oral(ka, cmt=1)

; Create a separate dummy compartment for the AUC
compartment(cmt=2, amount=AUCtau)
iv(cmt=2, p= - AUCtau/amtDose)

EQUATION:
odeType=linear
ddt_AUCtau = 1/V * Ac

OUTPUT:
output = {Cc}
table = {AUC}

Computing the Cmax in the structural model

Cmax can be calculated directly in the structural model by integrating the increase of the concentration. Here is an example for a one-compartment model with first-order absorption and linear elimination:
[LONGITUDINAL]
input = {Cl, ka, V}

PK:
depot(target=Ad)

EQUATION:

; initial conditions
t_0 = 0
Ad_0 = 0
Ac_0 = 0

ddt_Ad = -ka*Ad
ddt_Ac = ka*Ad -k*Ac
Cc = Ac/V

; Calculation of Cmax
slope = ka*Ad -k*Ac
Cmax_0 = 0
if slope > 0 && Cc > Cmax
   x = slope/V
else
   x = 0
end
If the dose are administered as bolus, it is necessary to add in the model a very short infusion in order to avoid the instantaneous increase of the concentration. This is what is done in the example below, for a three-compartments model with linear elimination. The short infusion duration can be adapted by modifying dT=0.1 to set a small duration with respect to the time scale. If one prefers to keep strict bolus administrations, it is also possible to resimulate the project with simulx and post-process the result in R to extract the Cmax.
If the doses are administered via iv infusion, dT=0.1 can be replaced by dT=inftDose to read the infusion duration from the data.

[LONGITUDINAL]
input = {Cl, V1, Q2, V2, Q3, V3}

EQUATION:

; Parameter transformations 
V = V1 
k = Cl/V1 
k12 = Q2/V1 
k21 = Q2/V2 
k13 = Q3/V1 
k31 = Q3/V3

; initial conditions
t_0 = 0
Ac_0 = 0
A2_0 = 0
A3_0 = 0

;short pseudo-infusion duration
dT=0.1 ; use dT=inftDose if the administration is infusion: inftDose is the infusion duration from the last dose read from the data

; infusion input to Ac
if t < tDose+dT
   input=amtDose/dT ;amtDose is the last dose amount read from the data
else
   input=0
end

dAc = input -k*Ac - k12*Ac - k13*Ac + k21*A2 + k31*A3
ddt_Ac = dAc
ddt_A2 = k12*Ac - k21*A2
ddt_A3 = k13*Ac - k31*A3
Cc = Ac/V

; Calculation of AUC
AUC_0 = 0
ddt_AUC = Cc

; Calculation of Cmax
Cmax_0 = 0
if dAc > 0 && Cc > Cmax
   x = dAc/V
else
   x = 0
end

ddt_Cmax = x

OUTPUT:
output = {Ac, Cc}
table = {Cmax, AUC}