2024 - Rome - Italy

PAGE 2024: Methodology - New Modelling Approaches
Matthew Fidler

nlmixr2, rxode2 and Monolix: interchangeable models using monolix2rx and babelmixr2

Matthew Fidler (1, 9), William S. Denney (2, 9), John Harrold (8, 9), Richard Hooijmakers (4, 9), Rik Schoemaker (3, 9), Max Taubert(1, 9), Mirjam Trame (5, 9), Theodoros Papathanasiou (6, 9), Justin Wilkins (3, 9)

(1) Novartis Pharmaceuticals, USA, (2) Human Predictions, USA, (3) Occams, The Netherlands, (4) LAP&P Consultants, The Netherlands, (5) Certara Strategic Consulting, USA, (6) GSK, Switzerland, (7) Takeda, (8) Seagen, (9) The nlmixr2 team

Introduction: nlmixr2 (www.nlmixr2.org) is an open-source R package, freely available on CRAN[1] and GitHub[2]. It builds on rxode2[3], an R package for simulation of nonlinear mixed effect models using ordinary differential equations (ODEs), providing an efficient and versatile way to specify pharmacometric models and dosing scenarios, with rapid execution due to compilation in C. Monolix [4] is a commercial tool for non-linear mixed effects modeling built around the SAEM algorithm.

Since nlmixr2, rxode2 and Monolix perform similar tasks, tools to convert between these different model specification formats have the potential to greatly improve efficiency when implementing Monolix models in rxode2, or converting an nlmixr2 model to run in Monolix. 

Objectives:

Create tools to allow bidirectional interoperability with nlmixr2/rxode2 and Monolix:

  • Create a tool to run nlmixr2 models in Monolix, and automatically ensure the translation is accurate
  • Create a tool to import Monolix models into rxode2/nlmixr2, and automatically ensure the translation is accurate

Methods: The R package babelmixr2[5] accepts rxode2/nlmixr2 models and uses the built-in R parser to navigate the create an internal representation of the model. With this information, babelmixr2 generates a Monolix Mlxtran file and Monolix text model file. The input data are also translated from rxode2/nlmixr2 to Monolix-compatible format.  Once the code and data are generated, Monolix is used to run the model (through the lixoftConnectors package).  After Monolix has completed its run, the parameter estimates are read in (including random effects), and nlmixr2 is used to calculate residuals and predictions.  This allows the individual predictions and population predictions to be compared easily between Monolix and nlmixr2 outputs and simultaneously generates a valid (and validated) nlmixr2/rxode2 model suitable for performing simulations.

The R package monolix2rx[6] takes Monolix Mlxtran and text files as input and creates an rxode2 model representation of the model.  It reads the final parameter estimates and uses C-based parsing in dparser[7] to create a nlmixr2-compatible model with specified endpoints. Additionally, the parsing routine for Mlxtran model files is capable of converting a Monolix model to an R-readable object which can be used in other open source packages like ggPMX[8].

We will demonstrate the application and utility of these tools with model case studies. For tool validation, we successfully ran the nlmixr2 example models in Monolix.

Results:  All of the demonstration files in Monolix could be read by the monolix2rx Mlxtran parser. Continuous-endpoint models were converted to rxode2/nlmixr2 format. Additionally, the models provided with the Monolix 2021R2 library were successfully imported and converted.

One feature when using nlmixr2 and Monolix translations is they allowed calculation of conditional weighted residuals which is not available in Monolix, but can use the nlmixr2 methodology to calculate with the Monolix fits.  This could add another option for diagnosing Monolix model fits in addition to the PDE plots that are often used.

Conclusion: The results of our testing illustrate how these tools can be used to speed up model development time and minimize error when cross-converting Monolix and nlmixr2 models. For nlmixr2 runs, we know instantaneously how well the translation tools are performing relative to one another. Additionally, the ability to use rxode2 to generate visual predictive checks (VPCs) and clinical trial simulations without any intermediate steps, and knowing immediately whether a translation has worked correctly, represents a great convenience for pharmacometricians wishing to share their analyses with those without Monolix.



References:
[1] https://cran.r-project.org/package=nlmixr2
[2] https://github.com/nlmixr2/nlmixr2
[3] https://github.com/nlmixr2/rxode2
[4] https://lixoft.com/products/monolix/
[5] https://github.com/nlmixr2/babelmixr2
[6] https:://github.com/nlmixr2/monolix2rx/
[7] https://github.com/nlmixr2/dparser-R[1] https://cran.r-project.org/package=nlmixr2
[2] https://github.com/nlmixr2/nlmixr2
[3] https://github.com/nlmixr2/rxode2
[4] https://lixoft.com/products/monolix/
[5] https://github.com/nlmixr2/babelmixr2
[6] https:://github.com/nlmixr2/monolix2rx/
[7] https://github.com/nlmixr2/dparser-R
[8] https://github.com/ggPMXdevelopment/ggPMX



Reference: PAGE 32 (2024) Abstr 10797 [www.page-meeting.org/?abstract=10797]
Poster: Methodology - New Modelling Approaches
Click to open PDF poster/presentation (click to open)
Top