powered by
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)
(Model) Updated model
(Model) Pharmpy model object
if (FALSE) { model <- load_example_model("pheno") model$statements model <- cleanup_model(model) model$statements }
Run the code above in your browser using DataLab