Introduction
A list of PK macros can be used as shortcuts to easily define PK models. All PK macros should be defined in a PK: block that must be included into the [LONGITUDINAL] section. Macros can be combined with ODE equations defined in an EQUATION: block. PK macros cannot be included into an arithmetic expression and cannot be enclosed within a conditional statement
There are three types of macros. We show below as example the same one-compartmental PK model with first-order absorption and linear elimination, using parameters (ka, V, Cl), defined in three different ways that involve the three types of macros.
You can read more details about each of them here:
The depot macro
This macro is used to provide a link between the administration information in the data set and the model, the rest of the model being defined as equations.
PK:
; depot() macro applies doses defined in the datset to the ODE variable Ad
depot(target = Ac, ka)
EQUATION:
Ac_0 = 0
ddt_Ac = -(Cl/V)*Ac
The pkmodel macro
This macro provides a shortcut for standard PK models.
Example:
PK:
; pkmodel() macro to define simple PK models in one line
Cc = pkmodel(ka, V, Cl)
Piecewise macros
A list of piecewise macros can be combined together to describe PK models. These macros allow the user to have an intuitive and compact representation of the most common PK models used in pharmacometrics.
Example:
PK:
; definition of the central compartment, numbered 1, with volume V and concentration Cc
compartment(cmt=1, volume=V, concentration=Cc)
; definition of an oral absorption with first-order rate ka and bioavailability F for doses with admid=1
; arriving into the central compartment. Note that the depot compartment is implicit.
absorption(adm=1, cmt=1, ka)
; definition of an elimination from the central compartment 1 with clearance Cl
elimination(cmt=1, Cl)