babelmixr2 and PopED

By Matthew Fidler in rxode2 monolix2rx monolix nonmem2rx nonmem babelmixr2 PopED

November 5, 2024

New babelmixr2 integrates PopED.

I am excited to announce today a new version of babelmixr2 has been released that streamlines creating fast, efficient PopED databases for optimal design.

With the babelmixr2 package you can:

  • Import your NONMEM model to rxode2/nlmixr2 format using nonmem2rx

  • Import your Monolix model to rxode2/nlmixr2 using monolix2rx

  • Use your existing nlmixr2 model or create your own rxode2/nlmixr2 model

With it in the nlmixr2 format, you can then quickly do optimal design

Key notes in using PopED using babelmixr2

  • babelmixr2 requires a design dataset instead of design options, which translates to design options like xt, model_switch etc, (described here)

  • You can get the underlying PopED code from the nlmixr2 model if you want (as described in the annotated PopED example)

  • babelmixr2 loads models into memory and needs to keep track of which model is loaded. To help this you need to use babel.poped.database in place of create.poped.database when modifying babelmixr2 generated PopED databases. If this isn’t done, there is a chance that the model loaded will not be the expected loaded model and may either crash R or possibly give incorrect results.

  • babelmixr2 translates all error components to variances instead of the standard deviations in the nlmixr2/rxode2 model (required by PopED)

  • When there are covariances in the omega specification, they will be identified as D[#,#] in the PopED output. To see what these numbers refer to it is helpful to see the name translations with model$popedD. Note the model must be processed into a rxode2 object.

  • Depending on your options, babelmixr2 may literally fix the model components, which means indexes may be different than you expect. The best way to get the correct index is use the babelmixr2 function babelBpopIdx() which is useful for using PopED.

  • babelmixr2 uses model times in creating PopED databases; therefore models with modeling times in them cannot be used in this translation

  • babelmixr2 does not yet support inter-occasion variability models.

  • At the current time, the ODE solution used is the fastest of the models tested, but keep in mind this is problem dependent. To me, the most important feature is not the speed of the model, but the ease of translating into a PopED database from the tools you use (like nlmixr2, NONMEM and Monolix).

Many of the PopED example models were recoded as babelmixr2/PopED models to show how to use the interface and are included in the babelmixr2 package here

One last note, at the time of writing if you are on Windows and want to use parallel processing in PopED you need a special version of PopED which can be installed by:

remotes::install_github("mattfidler/PopED", ref="babelmixr2-win")

This blog is coming right before the ACoP 2024 conference.

If you want stickers or to talk more about this or other nlmixr2 features/request you can:

Thanks, see you in person soon if you are going to ACoP 2024!

Posted on:
November 5, 2024
Length:
3 minute read, 514 words
Categories:
rxode2 monolix2rx monolix nonmem2rx nonmem babelmixr2 PopED
See Also: