nlmixr2 Neural Network ODEs with pmxNODE

Neural Network ODEs and nlmixr2 I have had some requests to talk about nlmixr2 using neural network ODEs, since neural networks are something that more people are exploring with the explosion of artificial intelligence LLMs. There is a package, pmxNODE, by Dominic Bräm that adds neural network ODEs to pharmacometric modeling tools like NONMEM, Monolix and nlmixr2. In addition to the code that Dominic has added, I extended this package to allow Neural Networks directly in a rxode2 or nlmixr2 model.

nlmixr2 augmented plot

This month I will on a single nlmixr2’s plot function that is shared with nlme, augPred(). I think this is useful but also harder to find like the rxode2 plots discussed last month. The example of this feature is the phenobarbitol data: library(nlmixr2) pheno <- function() { ini({ tcl <- log(0.008) # typical value of clearance tv <- log(0.6) # typical value of volume ## var(eta.cl) eta.cl + eta.v ~ c(1, 0.

By Matthew Fidler in nlmixr2

March 31, 2025

rxode2 plotting

This month I will focus on rxode2’s plotting functions. I think these are very useful but not very well known. In general I will focus on three things: plotting single subjects, plotting multiple subjects and plotting confidence bands. Plot functions rxode2 plotting Of course discussion of plotting require a model and simulation, so we will use the model from the original tutorial: library(rxode2) ## Model from rxode2 tutorial m1 <- rxode2({ KA <- 2.

By Matthew Fidler in rxode2

February 25, 2025

nlmixr2/rxode2 user functions to modify code

This month I will talk about a new type of user function. Previously, I spoke of user functions that you can use in your code to extend the functionality of rxode2 and nlmixr2. Recently we released the ability for certain functions to generate code. I will go over examples that could be helpful to extend rxode2 ui models: An example that allows arguments to be named inside of the rxode2 ui models (though classic models still do not allow this).

By Matthew Fidler in rxode2

January 24, 2025

nlmixr2/rxode2 mu referencing 3.0/4.0

This month, I will talk about about a new iteration of mu-referencing in nlmixr2, which I call mu3 and mu4. What is mu referencing in nlmixr2 – Review from another post From the last blog post about mu-referencing, I will give a brief overview of mu-referencing and what mu-2 referencing is and how it is expanded a bit more. mu-referencing is combining a fixed effect, random effect and possibly a covariate in the form: