set_transit_compartments function

set_transit_compartments

set_transit_compartments

Set the number of transit compartments of model.

Initial estimate for absorption rate is set the previous rate if available, otherwise it is set to the time of first observation/2.

set_transit_compartments(model, n, keep_depot = TRUE)

Arguments

  • model: (Model) Pharmpy model
  • n: (numeric) Number of transit compartments
  • keep_depot: (logical) FALSE to convert depot compartment into a transit compartment

Returns

(Model) Pharmpy model object

Examples

## Not run: model <- load_example_model("pheno") model <- set_transit_compartments(model, 3) model$statements$ode_system ## End(Not run)

See Also

add_lag_time

  • Maintainer: Rikard Nordgren
  • License: LGPL (>= 3)
  • Last published: 2024-12-04