Freya Bachmann1, Britta Steffens2, Johannes Schropp1, Marc Pfister2, Gilbert Koch2, Dominic Bräm2
1Department of Mathematics and Statistics, University of Konstanz, 2Pediatric Pharmacology and Pharmacometrics, University Children's Hospital Basel (UKBB), University of Basel
Objectives The optimal drug dosing algorithm OptiDose, recently implemented in NONMEM [1,2], allows users to solve their own optimal dosing tasks to advance pharmacometrics (PMX) from modeling-and-simulation towards modeling-and-optimization. Optimality is characterized by achieving a therapeutic goal either specified by a reference function describing a desired outcome, or by both efficacy and safety targets. Defining an optimal dosing task requires i) a PMX model predicting the disease dynamics, ii) a dosing schedule with doses or dosing intervals to be optimized, and iii) an objective function characterizing the therapeutic goal. While the first two are standard in PMX modeling, the third might be more tricky and eventually keep users from applying OptiDose. Consequently, the objective of this work is to provide an R package “optiDoseR” [3] for automatic generation of code to solve an optimal dosing task in either NONMEM, Monolix or R via nlmixr. Methods The optiDoseR package contains several R functions for generating the necessary code to set up an optimal dosing task based on specified inputs. First, function newOptiProject creates a new project for computing optimal drug dosing and sets the desired output language to Monolix, NONMEM or R. If a PMX model was already fitted therein, it can be loaded from a file via addPmxRun. Otherwise, structural model, population and individual parameters can be manually added to the optiProject. Each dose is defined by addDoseLevel with the dosing time point when the dose is first administered, dosing interval for repeated applications, as well as an initial estimate for the dose. If optimizing for dosing intervals, addDosingInterval indicates first dosing time point, administered dose and number of repeated applications, as well as an initial estimate for the dosing interval. The therapeutic goal allows for different optimization tasks, such as aiming for a response to remain above or below a certain threshold while minimizing or maximizing same or another response, at a specific time point or for a time interval, or to achieve a reference target at a specific time point or reference function on a time interval as closely as possible. From this information, optiDoseR sets up the optimal dosing task. Generated code can then be run in NONMEM, Monolix or directly in R with package nlmixr to compute optimal doses or dosing intervals. Results With the optiDoseR package, we were able to automatically generate the data files and control streams in NONMEM for all examples in [1,2]. Namely, a biomarker indirect response example where a healthy biomarker level shall be approached without too sudden changes, a bispecific antibody example where the most beneficial level of the ternary drug-receptor complex is desired, an example to achieve a target AUC of the drug concentration at final time, a tumor growth inhibition combined with myelosuppression example where the tumor weight shall be minimized without entering a state of neutropenia, and an antibiotic drug example to achieve efficacious bacterial killing with lowest drug administration possible. The optiDoseR package generated the same code as printed in the manuscripts. Moreover, sequential optimization of 1000 individuals based on assumed inter-individual variability in their model parameters was performed for the tumor growth inhibition plus myelosuppression example. In addition, for all these examples, we automatically created the corresponding Monolix model files as well as R-only code utilizing nlmixr. Resulting optimal doses and dosing intervals from different softwares were the same up to neglectable numerical differences. Conclusion The presented optiDoseR package facilitates application of OptiDose in R, NONMEM and Monolix. As such, everyone in the PMX community may solve their own optimal dosing tasks without implementing the optimal control task by hand. Hence, we envision this R package to further advance PMX and to improve therapeutic outcomes for each individual patient by calculating their optimal doses or dosing intervals.
[1] Bachmann F, Koch G, Bauer RJ, Steffens B, Szinnai G, Pfister M, Schropp J (2024). Computing optimal drug dosing regarding efficacy and safety: the enhanced OptiDose method in NONMEM. J Pharmacokinet Pharmacodyn. https://doi.org/10.1007/s10928-024-09940-9 [2] Bachmann F, Koch G, Bauer RJ, Steffens B, Szinnai G, Pfister M, Schropp J (2023). Computing optimal drug dosing with OptiDose: implementation in NONMEM. J Pharmacokinet Pharmacodyn. https://doi.org/10.1007/s10928-022-09840-w [3] Bräm D (2025). R package optiDoseR. https://github.com/braemd/optiDoseR
Reference: PAGE 33 (2025) Abstr 11329 [www.page-meeting.org/?abstract=11329]
Poster: Software Demonstration