# Pumas model description for absolute bioavailability
@param begin
# Population-typical value for absolute bioavailability
∈ RealDomain(; init = 0.01)
θF end
@dosecontrol begin
# The estimate for θF is from -∞ to ∞ to assist with estimation
# Need to constrain the value between 0 and 1
= logistic(θF)
fdepot # Specify absolute bioavailability for the dosing compartments
= (; Depot = fdepot)
bioav end
Module 6: Absorption Models
1 Module Introduction and Objectives
The target audience are pharmacometricians with experience in NONMEM or other equivalent non-linear modeling software commonly used in the field pharmacometrics. The Module makes reference to similarities and differences to NONMEM and builds on the concepts described in Learning Path 2: Introduction to Pumas and Learning Path 3: Module 5: Structural Model Building.
Analysis datasets for population pharmacokinetic (PK) and pharmacodynamic (PD) modeling have commonly embedded sets of instructions associated with dosing information for non-linear mixed effect modeling software. These instructions are often independent dose events represented by rows in a data frame for each individual in the analysis population.
Model parameters and differential equations typically describe the movement of drug between model compartments, however, do not describe instantaneous changes in the state of the system that occur due to dose administration (for example, the addition of drug to the Depot compartment for first-order absorption). Additionally, different absorption models require different instructions to tell the software where, when, how fast, and how much needs to be added to model compartments.
For each absorption model presented in this Module, a corresponding example of the dataset will be presented in context of Pumas, as well as the relevant Pumas model code blocks.
The absorption models presented in this Module are:
- Bioavailability (absolute and relative)
- First-order absorption
- Zero-order absorption (parameterized as estimation of rate or duration of input)
- Delayed absorption
- Combined first- and zero-order absorption (parallel and sequential)
1.1 Objectives
The objectives of Module 6: Absorption Models are to:
- Explain dataset requirements for handling different absorption models
- Present example code for describing different absorption processes in Pumas
2 Bioavailability
Bioavailability following extravascular administration is predominantly handled by the Pumas model code. Relative and absolute bioavailability can both be handled (the latter depending on availability of data following intravenous [IV] administration).
In @dosecontrol
, the amount of drug going into a designated compartment can be specified by supplying a NamedTuple
to bioav
.
2.1 Absolute
Absolute bioavailability is the proportion of the dose administered that reaches the systemic circulation (after accounting for drug lost due to not being dissolved, gut metabolism, and/or first-pass metabolism). Absolute bioavailability estimates are the fraction of the whole dose administered and must be constrained between 0 and 1.
Estimating the parameter θF in the logit domain can help with parameter estimation and prevent confidence intervals from including boundary points (i.e., 0 and 1).
The analysis dataset is required to have an accurate representation of the dosing records where the cmt
column is correctly specified to be the compartment where doses should be administered. In the case of a model with first-order absorption, this is commonly referred to as the Depot
compartment.
The first 6 individuals’ dosing records are presented:
id | time | amt | evid | cmt | rate | conc | pca | WEIGHT | AGE | SEX |
1 | 0 | 100 | 1 | Depot | 0 | missing | missing | 66.7 | 50 | Male |
2 | 0 | 100 | 1 | Depot | 0 | missing | missing | 66.7 | 31 | Male |
3 | 0 | 120 | 1 | Depot | 0 | missing | missing | 80 | 40 | Male |
4 | 0 | 60 | 1 | Depot | 0 | missing | missing | 40 | 46 | Female |
5 | 0 | 113 | 1 | Depot | 0 | missing | missing | 75.3 | 43 | Male |
6 | 0 | 90 | 1 | Depot | 0 | missing | missing | 60 | 36 | Female |
2.2 Relative
Relative bioavailability is a multiplicative scalar of the dose administered that reaches the systemic circulation. Relative bioavailability estimates must be greater than zero, but can be greater than 1 indicating that a specific condition results in more drug bioavailable to the system than the reference scenario.
The estimated parameter, θFrel, requires a lower boundary of zero but is not constrained by an upper boundary:
# Pumas model description for relative bioavailability
@param begin
# Population-typical value for relative bioavailability
∈ RealDomain(lower = 0.0, init = 1.0)
θFrel end
@dosecontrol begin
# Specify relative bioavailability for the dosing compartments
= (; Depot = θFrel)
bioav end
The analysis dataset is required to have an accurate representation of the dosing records where the cmt
column is correctly specified to be the compartment where doses should be administered. In the case of a model with first-order absorption, this is commonly referred to as the Depot
compartment.
The first 6 individuals’ dosing records are presented:
id | time | amt | evid | cmt | rate | conc | pca | WEIGHT | AGE | SEX |
1 | 0 | 100 | 1 | Depot | 0 | missing | missing | 66.7 | 50 | Male |
2 | 0 | 100 | 1 | Depot | 0 | missing | missing | 66.7 | 31 | Male |
3 | 0 | 120 | 1 | Depot | 0 | missing | missing | 80 | 40 | Male |
4 | 0 | 60 | 1 | Depot | 0 | missing | missing | 40 | 46 | Female |
5 | 0 | 113 | 1 | Depot | 0 | missing | missing | 75.3 | 43 | Male |
6 | 0 | 90 | 1 | Depot | 0 | missing | missing | 60 | 36 | Female |
3 First-Order Absorption
First-order absorption models describe the passive processes driven by the concentration gradient between the absorption site and systemic circulation. The estimate for the first-order absorption rate constant, ka, is typically in the units of hr-1. The absorption rate at a given time is dependent on the amount remaining in the Depot
compartment.
In Pumas, this absorption process is described in @dynamics
.
# Pumas model description for first-order absorption
@param begin
# Population-typical value for first-order absorption rate constant
∈ RealDomain(lower = 0.0, init = 1.0)
θKA end
@pre begin
# Individual PK parameters
= θKA
Ka end
@dynamics begin
' = -Ka * Depot
Depot' = Ka * Depot - CL / VC * Central
Centralend
The analysis dataset is required to have an accurate representation of the dosing records where the cmt
column is correctly specified to be the compartment where doses should be administered. In the case of a model with first-order absorption, this is commonly referred to as the Depot
compartment.
Setting the rate
variable in the analysis dataset to 0
informs the system to add the dose amount instantaneously added to the target compartment (this is set by default).
The first 6 individuals’ dosing records are presented:
id | time | amt | evid | cmt | rate | conc | pca | WEIGHT | AGE | SEX |
1 | 0 | 100 | 1 | Depot | 0 | missing | missing | 66.7 | 50 | Male |
2 | 0 | 100 | 1 | Depot | 0 | missing | missing | 66.7 | 31 | Male |
3 | 0 | 120 | 1 | Depot | 0 | missing | missing | 80 | 40 | Male |
4 | 0 | 60 | 1 | Depot | 0 | missing | missing | 40 | 46 | Female |
5 | 0 | 113 | 1 | Depot | 0 | missing | missing | 75.3 | 43 | Male |
6 | 0 | 90 | 1 | Depot | 0 | missing | missing | 60 | 36 | Female |
4 Zero-Order Absorption
Zero-order absorption models describe processes where drug is absorbed at a constant rate independent of the concentration gradient between the absorption site and systemic circulation and independent of the amount of drug still yet to be absorbed. Depending on the application, either the rate or duration of zero-order absorption can be estimated.
4.1 Rate
The estimate for the zero-order absorption rate, k0, is typically in the units of mg/hr. Therefore, for analysis datasets with a range of dose amounts, the duration of absorption will differ between doses when the rate is the same:
Amount | Rate | Duration |
5 mg | 100 mg/hr | 0.05 hr |
10 mg | 100 mg/hr | 0.1 hr |
20 mg | 100 mg/hr | 0.2 hr |
50 mg | 100 mg/hr | 0.5 hr |
100 mg | 100 mg/hr | 1.0 hr |
200 mg | 100 mg/hr | 2.0 hr |
400 mg | 100 mg/hr | 4.0 hr |
800 mg | 100 mg/hr | 8.0 hr |
# Pumas model description for zero-order absorption rate
@param begin
# Population-typical value for zero-order absorption rate
∈ RealDomain(lower = 0.0, init = 100.0)
θK0 end
@dosecontrol begin
= (; Central = θK0)
rate end
@dynamics begin
' = -Central / Vc
Centralend
The analysis dataset is required to have an accurate representation of the dosing records where the cmt
column is correctly specified to be the compartment where doses should be administered. In the case of a model with zero-order absorption, dose is administered to the Central
compartment.
Setting the rate
variable in the analysis dataset to -1
informs the system that the zero-order absorption rate is defined as part of the Pumas model.
The first 6 individuals’ dosing records are presented:
id | time | amt | evid | cmt | rate | conc | pca | WEIGHT | AGE | SEX |
1 | 0 | 100 | 1 | Central | -1 | missing | missing | 66.7 | 50 | Male |
2 | 0 | 100 | 1 | Central | -1 | missing | missing | 66.7 | 31 | Male |
3 | 0 | 120 | 1 | Central | -1 | missing | missing | 80 | 40 | Male |
4 | 0 | 60 | 1 | Central | -1 | missing | missing | 40 | 46 | Female |
5 | 0 | 113 | 1 | Central | -1 | missing | missing | 75.3 | 43 | Male |
6 | 0 | 90 | 1 | Central | -1 | missing | missing | 60 | 36 | Female |
4.2 Duration
The estimate for the zero-order duration, dur0, is typically in the units of hr. Therefore, for analysis datasets with a range of dose amounts, the rate of absorption will differ between doses when the duration is the same:
Amount | Duration | Rate |
5 mg | 1 hr | 5.0 mg/hr |
10 mg | 1 hr | 10.0 mg/hr |
20 mg | 1 hr | 20.0 mg/hr |
50 mg | 1 hr | 50.0 mg/hr |
100 mg | 1 hr | 100.0 mg/hr |
200 mg | 1 hr | 200.0 mg/hr |
400 mg | 1 hr | 400.0 mg/hr |
800 mg | 1 hr | 800.0 mg/hr |
# Pumas model description for zero-order absorption duration
@param begin
# Population-typical value for zero-order absorption duration
∈ RealDomain(lower = 0.0, init = 1.0)
θDUR0 end
@dosecontrol begin
= (; Central = θDUR0)
duration end
@dynamics begin
' = -Central / Vc
Centralend
The analysis dataset is required to have an accurate representation of the dosing records where the cmt
column is correctly specified to be the compartment where doses should be administered. In the case of a model with zero-order absorption, dose is administered to the Central
compartment.
Setting the rate
variable in the analysis dataset to -2
informs the system that the zero-order absorption duration is defined as part of the Pumas model and that the rate should be calculated based on the amt
variable and duration
estimate.
The first 6 individuals’ dosing records are presented:
id | time | amt | evid | cmt | rate | conc | pca | WEIGHT | AGE | SEX |
1 | 0 | 100 | 1 | Central | -2 | missing | missing | 66.7 | 50 | Male |
2 | 0 | 100 | 1 | Central | -2 | missing | missing | 66.7 | 31 | Male |
3 | 0 | 120 | 1 | Central | -2 | missing | missing | 80 | 40 | Male |
4 | 0 | 60 | 1 | Central | -2 | missing | missing | 40 | 46 | Female |
5 | 0 | 113 | 1 | Central | -2 | missing | missing | 75.3 | 43 | Male |
6 | 0 | 90 | 1 | Central | -2 | missing | missing | 60 | 36 | Female |
5 Delayed Absorption
Delayed absorption processes can represent a diverse phenomena from disintegrating and dissolution of solid dosage formulations, to gastric emptying (via the oral administration route), to diffusion delays (for intra-nasal administration).
5.1 Lag
Absorption lags allow for delays in the initiation of a first- or zero-order absorption process. The time that the dose amount is added to the target compartment is the sum of the time
variable in the analysis dataset and lags
specified in the Pumas model.
The estimate for the absorption lag, θALAG, is typically in the units of hr. The example of Pumas code and dataset specification assumes that a first-order absorption processes starts after an initial delay (or lag):
# Pumas model description for absorption lag
@param begin
# Population-typical value for first-order absorption rate constant
∈ RealDomain(lower = 0.0, init = 1.0)
θKA # Population-typical value for first-order absorption lag
∈ RealDomain(lower = 0.0, init = 0.5)
θALAG end
@pre begin
# Individual PK parameters
= θKA
Ka end
@dosecontrol begin
= (; Depot = θALAG)
lags end
@dynamics begin
' = -Ka * Depot
Depot' = Ka * Depot - Central / Vc
Centralend
The analysis dataset is required to have an accurate representation of the dosing records where the cmt
column is correctly specified to be the compartment where doses should be administered. In the case of a model with first-order absorption, this is commonly referred to as the Depot
compartment.
Setting the rate
variable in the analysis dataset to 0
informs the system to add the dose amount instantaneously added to the target compartment (this is set by default).
The first 6 individuals’ dosing records are presented:
id | time | amt | evid | cmt | rate | conc | pca | WEIGHT | AGE | SEX |
1 | 0 | 100 | 1 | Depot | 0 | missing | missing | 66.7 | 50 | Male |
2 | 0 | 100 | 1 | Depot | 0 | missing | missing | 66.7 | 31 | Male |
3 | 0 | 120 | 1 | Depot | 0 | missing | missing | 80 | 40 | Male |
4 | 0 | 60 | 1 | Depot | 0 | missing | missing | 40 | 46 | Female |
5 | 0 | 113 | 1 | Depot | 0 | missing | missing | 75.3 | 43 | Male |
6 | 0 | 90 | 1 | Depot | 0 | missing | missing | 60 | 36 | Female |
5.2 Transit Compartments
Implementation of estimated lag parameters often results in numerical instability as they are a discontinuous representation relative to the administration time specified in the analysis dataset.
Transit compartment absorption models accommodate a sequence of compartments with transfer rates that account for the delay between administration in the Depot
compartment to entry into the systemic circulation (i.e., Central
compartment).
In a transit absorption model, the delay is dictated by movement through transit compartments with a first-order transit rate constant, ktr. Movement from the nth transit compartment to the Central
compartment is dictated by the first-order absorption rate constant, ka.
The mean transit time (MTT) can be estimated to assist with estimation and interpretation of the time delay, such that: k_{tr} = \frac{n+1}{MTT} Where n is the number of transit compartments in the model.
Additionally, it may be difficult to identify unique values for both ktr and ka. Therefore, models where ka = ktr can be explored.
The estimates for the mean transit time (MTT), first-order transit rate constant (ktr), first-order absorption rate constant (ka) are typically in the units of hr, hr-1, and hr-1, respectively.
# Pumas model description for transit absorption model
@param begin
# Population-typical value for mean transit time
∈ RealDomain(lower = 0.0, init = 0.5)
θMTT # Population-typical value for first-order absorption rate constant
∈ RealDomain(lower = 0.0, init = 1.0)
θKA end
@pre begin
# Individual PK parameters
= θMTT
MTT = 4
ntransits = (ntransits + 1) / MTT
KTR = θKA
Ka end
@dynamics begin
' = -KTR * Depot
Depot' = KTR * Depot - KTR * transit1
transit1' = KTR * transit1 - KTR * transit2
transit2' = KTR * transit2 - Ka * transit3
transit3' = Ka * transit3 - Central / Vc
Centralend
The analysis dataset is required to have an accurate representation of the dosing records where the cmt
column is correctly specified to be the compartment where doses should be administered. In the case of a model with first-order absorption, this is commonly referred to as the Depot
compartment.
Setting the rate
variable in the analysis dataset to 0
informs the system to add the dose amount instantaneously added to the target compartment (this is set by default).
The first 6 individuals’ dosing records are presented:
id | time | amt | evid | cmt | rate | conc | pca | WEIGHT | AGE | SEX |
1 | 0 | 100 | 1 | Depot | 0 | missing | missing | 66.7 | 50 | Male |
2 | 0 | 100 | 1 | Depot | 0 | missing | missing | 66.7 | 31 | Male |
3 | 0 | 120 | 1 | Depot | 0 | missing | missing | 80 | 40 | Male |
4 | 0 | 60 | 1 | Depot | 0 | missing | missing | 40 | 46 | Female |
5 | 0 | 113 | 1 | Depot | 0 | missing | missing | 75.3 | 43 | Male |
6 | 0 | 90 | 1 | Depot | 0 | missing | missing | 60 | 36 | Female |
6 Combined First- and Zero-Order Absorption
A combination of first- and zero-order absorption processes may arise when drug at higher doses exceeds its solubility in the gut resulting in slower dissolution, or by design for modified/controlled/sustained release formulations that may have an immediate release component followed by a slow release component.
The combination of first- and zero-order absorption processes can occur in parallel or sequentially (i.e., first-order process then zero-order, or zero-order process then first-order). For either approach, the fraction or amount of a dose being absorbed via one of the processes is estimated.
The example code and analysis dataset below illustrate a scenario where:
- First- and zero-order absorption processes are occurring in parallel each with their own absorption lags
- The fraction of the dose being absorbed by first-order processes is estimated and the remaining fraction is absorbed by zero-order processes
- The rate of the zero-order process is estimated
# Pumas model description for transit absorption model
@param begin
# Population-typical value for first-order absorption lag
∈ RealDomain(lower = 0.0, init = 1.0)
θALAG1 # Population-typical value for first-order absorption rate constant
∈ RealDomain(lower = 0.0, init = 1.0)
θKA # Population-typical value for zero-order absorption lag
∈ RealDomain(lower = 0.0, init = 1.0)
θALAG0 # Population-typical value for zero-order absorption rate
∈ RealDomain(lower = 0.0, init = 100.0)
θK0 # Population-typical value for fraction being absorbed by
# first-order processes
∈ RealDomain()
θFK1 end
@pre begin
# Individual PK parameters
= θKA
Ka = θK0
K0 end
@dosecontrol begin
# The estimate for θFK1 is from -∞ to ∞ to assist with estimation
# Need to constrain the value between 0 and 1
= logistic(θFK1)
fdepot # Specify fraction of dose going to each compartment
= (; Depot = fdepot, Central = 1 - fdepot)
bioav # Specify the absorption lag
= (; Depot = θALAG1, Central = θALAG0)
lags # Specify zero-order absorption rate
= (; Central = K0)
rate end
@dynamics begin
' = -Ka * Depot
Depot' = Ka * Depot - Central / Vc
Centralend
Each Dosing Event Requires 2 Dosing Records: The analysis dataset requires 2 records associated with each dosing event - one record provides a set of instructions for the first-order process, and the other provides the set of instructions for the zero-order process. Remember: It is the analysis dataset that provides the set of instructions of how (i.e., instantaneous bolus versus zero-order rate) and where (i.e., Depot
versus Central
) to add dose amounts.
Compartment Variable Specification: The analysis dataset is required to have an accurate representation of the dosing records where the cmt
column is correctly specified to be the compartment where doses should be administered. In the case of a model with first- and zero-order absorption, the fraction of dose being absorbed by first-order processes will be added to the Depot
compartment and the remaining fraction of dose absorbed by zero-order processes will be added to the Central
compartment.
Rate Variable Specification: Therate
variable in the analysis dataset also need to be defined appropriately for each absorption process. Here, it is 0
for first-order absorption, and -1
for zero-order absorption indicating that rate
will be estimated and defined in the Pumas model.
Note: The amt
column should contain the value of the total dose that was administered. For example, if 100 mg was administered to the individual, then both dosing records require amt
to be equal to 100. The fraction of the dose going to either first- or zero-order processes is handled by the Pumas model code.
Example Julia code for duplicating dosing records and making necessary modification is described below:
# Demonstrate how additional rows can be added to the DataFrame for each dosing event
= @chain examp_df begin
fozopara_examp_df # Bind another set of dosing records to the DataFrame where rate is set to -1
# to specify that zero-order absorption rate will be estimated, and where
# cmt is set to "Central"
vcat(_, @chain examp_df begin
@rsubset :evid == 1
@rtransform :rate = -1
@rtransform :cmt = "Central"
end)
# Arrange by id, time, and evid
@orderby :id :time :evid
end
As an example, 6 individuals’ dosing records are presented:
id | time | amt | evid | cmt | rate | conc | pca | WEIGHT | AGE | SEX |
1 | 0 | 100 | 1 | Depot | 0 | missing | missing | 66.7 | 50 | Male |
1 | 0 | 100 | 1 | Central | -1 | missing | missing | 66.7 | 50 | Male |
11 | 0 | 123 | 1 | Depot | 0 | missing | missing | 82 | 31 | Male |
11 | 0 | 123 | 1 | Central | -1 | missing | missing | 82 | 31 | Male |
12 | 0 | 113 | 1 | Depot | 0 | missing | missing | 75.3 | 32 | Male |
12 | 0 | 113 | 1 | Central | -1 | missing | missing | 75.3 | 32 | Male |
13 | 0 | 113 | 1 | Depot | 0 | missing | missing | 75.3 | 63 | Male |
13 | 0 | 113 | 1 | Central | -1 | missing | missing | 75.3 | 63 | Male |
14 | 0 | 75 | 1 | Depot | 0 | missing | missing | 50 | 36 | Female |
14 | 0 | 75 | 1 | Central | -1 | missing | missing | 50 | 36 | Female |
15 | 0 | 85 | 1 | Depot | 0 | missing | missing | 56.7 | 27 | Female |
15 | 0 | 85 | 1 | Central | -1 | missing | missing | 56.7 | 27 | Female |
The combined first- and zero-order absorption model can take many forms. Some other parameterizations include:
- Ensure
dose
is a variable included in the analysis dataset and specified as a covariate in the Pumas model - Estimate the amount absorbed by first-order processes (AK1) instead of estimating the fraction absorbed by first-order processes (FK1) in the Pumas model. The lower bound of AK1 will be 0.0
- Calculate the fraction of the dose absorbed by first-order processes (FK1) in the Pumas model. Doses less than AK1 will be all absorbed by first-order processes, and doses greater than AK1 will exhibit increasing fractions being absorbed by zero-order processes: \text{FK1} = \begin{cases} \frac{\text{AK1}}{\text{dose}} & \text{for dose }\geq\text{ AK1} \\ 1 & \text{for dose }\lt\text{ AK1} \end{cases}
- Assign FK1 to the
Depot
compartment and 1-FK1 to theCentral
compartment of thebioav
argument in@dosecontrol
in the Pumas model
- Set
rate
to-2
for dosing records associated with the zero-order process in the analysis dataset (i.e., wherecmt
=Central
) - Estimate the duration of the zero-order process (DUR0) instead of estimating the rate of the zero-order process (k0) in the Pumas model
- Assign DUR0 to the
Central
compartment of theduration
argument in@dosecontrol
in the Pumas model
- Estimate lags for zero- and first-order absorption processes, ALAG0 and ALAG1, respectively, in the Pumas model
- Assign ALAG0 to the
Central
compartment of thelags
argument in@dosecontrol
in the Pumas model - Assign the sum of the zero-order absorption lag, zero-order absorption duration, and the first-order absorption lag (i.e., ALAG0+DUR0+ALAG1) to the
Depot
compartment of thelags
argument in@dosecontrol
in the Pumas model - Note: DUR0 may already estimated as part of the model. However, if the
rate
of the zero-order absorption process is estimated, the duration will need to be derived fromdose
andrate
- Note: It is difficult to define the end of the first-order absorption process. However, it can be defined that the zero-order process is initiated after the first-order process
- Estimate lags for zero- and first-order absorption processes, ALAG0 and ALAG1, respectively, in the Pumas model
- Assign ALAG1 to the
Depot
compartment of thelags
argument in@dosecontrol
in the Pumas model - Assign the sum of the first-order absorption lag and the zero-order absorption lag (i.e., ALAG1+ALAG0) to the
Central
compartment of thelags
argument in@dosecontrol
in the Pumas model
7 Summary
Pumas models handle absorption processes similarly to other non-linear mixed effect modeling software such as NONMEM. Both analysis datasets and model code have specific requirements for handling different absorption models. It is important to remember that both components may need to be changed when exploring different absorption processes during model building.