library(campsis)

This vignette shows how initial conditions may be used in CAMPSIS.

Init central compartment

Assume the following 2-compartment model is used.

model <- model_suite$nonmem$advan3_trans4

We'd like to init the central compartment to a predefined value, e.g. 1000.
This can be achieved as follows.

model <- model %>% add(InitialCondition(compartment=1, rhs="1000"))

The resulting model has now a new block [INIT] which describes the initial condition:

model

Let's now create a dataset with observations-only.

ds <- Dataset(50) %>%
  add(Observations(times=seq(0,72, by=0.5)))

We can now simulate this model:

results <- model %>% simulate(dataset=ds, seed=1)
shadedPlot(results, "CONC")


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