Dose Control Parameters (DCPs)
The @dosecontrol part of a PumasModel allows for specifying special pre-processed parameters known as the Dose Control Parameters (DCPs). Unlike standard parameters which are for use in other blocks, the DCPs are used to modify the applied doses.
There are two types of DCPs: general DCPs that apply to all doses, and DCPs that only apply to doses with a rate of -2.
The following DCPs apply to all doses:
lags: the lag of the dose. Default is0. A dose with a lag will take place at timet = dosetime + lag.bioav: the bioavailability of the dose. Default is1. For bolus doses, the effective dose is equal tobioav * amtwhereamtis the dose amount from the dosage regimen. For infusions, Pumas currently follows NONMEM and applies the bioavailability to thedurationsuch that the effective duration isbioav * durationfrom the dosage regimen. If you wish to keep the duration and only modify the effective dose it is possible to adjust theratedose control parameter instead (see below).
The following DCPs only apply to doses with a rate of -2:
rate: the rate of the dosing.duration: the duration of the dose.
The handling of rate and duration DCPs is intertwined since for each dose dose amount amt must satisfy amt = rate * duration:
- If both
rateanddurationare specified, then an error is thrown unlessamt = rate * durationis satisfied. - If
rateis specified but notduration, thendurationis automatically defined asduration = amt / rate. - If
durationis specified but notrate, thenrateis automatically defined asrate = amt / duration.
Pumas.@dosecontrol — Macro@dosecontrolDefine dose control parameters as a function of fixed and random effects. Options include bioav, duration, lags, and rate. Must be used in an @model block. For example:
@model begin
@dosecontrol begin
bioav = (Depot1 = max(0, θ[5]), Depot2 = clamp(1 - θ[5], 0.0, 1.0), Central = 1)
lags = (Depot1 = 0, Depot2 = max(0.1, θ[6]), Central = 0)
end
endSyntax
DCPs are specified in the @dosecontrol block by defining the parameter values associated with the dynamic variables (compartments) as a named tuple. Parameter values for omitted dynamic variables are implicitly set to the default value.
For instance,
@dosecontrol begin
lags = (; Depot1 = θ, Depot2 = 0.5)
endspecifies that:
- the lag of dosing into
Depot1is controlled byθ, - the lag of dosing into
Depot2is fixed at0.5, - the lag of dosing into all other compartments is set to the default lag of
0.
Example: Bioavailability
Let us consider a dosage regimen consisting of two bolus doses:
dr1 = DosageRegimen(10; time = 1, cmt = :Central)
dr5 = DosageRegimen(10; time = 5, cmt = :Central)
dr = DosageRegimen(dr1, dr5)If the model has the following @dosecontrol block:
@dosecontrol begin
bioav = (; Central = 1 / t)
endThen the effective bolus doses will be amt * bioav = 10 * 1 / 1 = 10 for the first dose and amt * bioav = 10 * 1 / 5 = 2 for the second dose. However, if the dose is an oral dose, and we want to use a first order absorption model the following does not affect the transfer from the Depot to the Central compartment continually throughout time
# doses
dr = DosageRegimen(10; time = [1, 5], cmt = :Depot)
# dose control specification
@model begin
# ...
@dosecontrol begin
bioav = (; Depot = 0.5, Central = 1 / t)
end
# ...
endThe behavior of the above doses and model specification means that we get an effective dose of amt * bioav = 10 * 0.5 = 5 at both time 1 and time 5 into Depot, and then the absorption from the gut to the blood stream follows whatever dynamic model we specified in the omitted sections indicated by ....
Another important thing to know and notice is that we follow NONMEM's behavior when it comes to bioavailability and infusions. Consider the following:
# doses
dr = DosageRegimen(10; rate = 0.5, time = [1, 5], cmt = :Central)
# dose control specification
@model begin
# ...
@dosecontrol begin
bioav = (; Central = 1 / t)
end
# ...
endThis model will alter the duration to ensure that duration * rate == amt. As a result, we get duration = bioav * av / rate. To keep the duration constant and have the rate adjust instead, you should not use bioav, but rather apply the bioavailability fraction directly to the rate. The above will then effectively have two infusions: one starting at t=1.0 and lasting for bioav * amt / rate = (1 / 1) * 10 / 0.5 = 20 units of time and one starting at t=5 and lasting bioav * amt / rate = (1 / 5) * 10 / 0.5 = 4 time units.