library(campsis)

This vignette shows how simple dose adaptations can be implemented.

Adapt the dose based on a covariate

Assume that your drug needs to be dosed according to the subject's weight, for instance 0.5 mg per kg. To illustrate this, let's use our 2-compartment PK model with absorption compartment.

model <- model_suite$nonmem$advan4_trans4

We're going to create a dataset with 4 individuals, weighing respectively 40, 60, 80 and 100 kg.

dataset <- Dataset(4) %>%
  add(Bolus(time=0, amount=0.5)) %>% # 0.5mg / kg
  add(Observations(times=0:24)) %>%
  add(Covariate("WT", c(40, 60, 80, 100)))

Our dataset is almost ready. We just have to define the dose adaptation formula. This is done as follows:

dataset <- dataset %>% add(DoseAdaptation("AMT*WT"))

Let's simulate this simple dataset. In order to check that the dose adaptation formula was well applied, we set the argument dosing to TRUE. Dosing rows will then be returned.

results <- model %>% disable("IIV") %>% simulate(dataset=dataset, dosing=TRUE, seed=1)
spaghettiPlot(results, "CONC", "ID")

Let's now have a look at the dosing information which is returned.

results %>% dosingOnly()

This looks great! The respective amounts that were given are indeed 20, 30, 40 and 50 mg!



Calvagone/campsis documentation built on April 17, 2024, 5:33 a.m.