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 torxode2
/nlmixr2
format using nonmem2rxImport your
Monolix
model torxode2
/nlmixr2
using monolix2rxUse your existing
nlmixr2
model or create your ownrxode2
/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 likext
,model_switch
etc, (described here)You can get the underlying
PopED
code from thenlmixr2
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 usebabel.poped.database
in place ofcreate.poped.database
when modifying babelmixr2 generatedPopED
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 thenlmixr2
/rxode2
model (required byPopED
)When there are covariances in the
omega
specification, they will be identified asD[#,#]
in thePopED
output. To see what these numbers refer to it is helpful to see the name translations withmodel$popedD
. Note themodel
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 thebabelmixr2
functionbabelBpopIdx()
which is useful for usingPopED
.babelmixr2
uses model times in creatingPopED
databases; therefore models with modeling times in them cannot be used in this translationbabelmixr2
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 aPopED
database from the tools you use (likenlmixr2
,NONMEM
andMonolix
).
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:
Stop by our poster: babelmixr2 and PopED: Quick Conversion of NONMEM, Monolix and nlmixr2/rxode2 Models to PopED Optimal Design Analysis
Attend our or our nlmixr2 tutorial on Thursday (Using Past Models to Bridge to Open Models and Open Science using nlmixr2)
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: