cleanup_model function

cleanup_model

cleanup_model

Perform various cleanups of a model

This is what is currently done

  • Make model statements declarative, i.e. only one assignment per symbol
  • Inline all assignments of one symbol, e.g. X = Y
  • Remove all random variables with no variability (i.e. with omegas fixed to zero)
  • Put fixed thetas directly in the model statements
cleanup_model(model)

Arguments

  • model: (Model) Pharmpy model object

Returns

(Model) Updated model

Note

When creating NONMEM code from the cleaned model Pharmpy might need toadd certain assignments to make it in line with what NONMEM requires.

Examples

## Not run: model <- load_example_model("pheno") model$statements model <- cleanup_model(model) model$statements ## End(Not run)
  • Maintainer: Rikard Nordgren
  • License: LGPL (>= 3)
  • Last published: 2024-12-04