This vignette shows how inter-occasion variability (IOV) can be added on a parameter at each administration.
Treatment IOV on KA
Let’s use a 2-compartment model with absorption compartment for this example.
model <- model_suite$nonmem$advan4_trans4We’re going to add a term IOV_KA on parameter
KA. This can be done as follows:
This model will not run unless we give some values for
IOV_KA. This can achieved by adding IOV to the dataset. The
following code will create a simple dataset with IOV.
ds_iov <- Dataset(50) %>%
add(Bolus(time = c(0, 24, 48), amount = 1000, compartment = 1)) %>%
add(Observations(times = seq(0, 72, by = 0.5))) %>%
add(IOV("IOV_KA", distribution = NormalDistribution(mean = 0, sd = 1)))To disable IOV on KA, the replace method can be
used:
We can now run the model with IOV on KA and without.
results_iov <- simulate(model = model, dataset = ds_iov, seed = 1)
results_no_iov <- simulate(model = model, dataset = ds_no_iov, seed = 1)
gridExtra::grid.arrange(
shaded_plot(results_iov, "CONC"),
shaded_plot(results_no_iov, "CONC"),
nrow = 1
)
