nlmixr2

nlmixr2 3.0

nlmixr2 3.0 is here nlmixr2 3.0 has been released and most of the related packages in the nlmixr2 ecosystem have been updated as well. Since there were a few non-backward compatible changes and breaking changes, the version has been bumped from 2 to 3. Most code will run the same, but because of the breaking change, we changed the major version. The big changes are: Non abi binary linkages between every package.

rxode2 calculating derived PK model parameters

One of the things that can be useful from time to time is to calculate different PK parameters based on whatever parameters you have estimated. There is a great function, calc_derived() in pmxTools that allows this calculation of the derived parameters (by my collaborators Justin Wilkins and Bill Denney). I think this is an underrated function that can help many people with typical calculations. rxode2 has the same type of function, which can be helpful to test the linCmt() functions, rxDerived().

nlmixr2/rxode2 mu referencing 2.0

This month, I will talk about about a new iteration of mu-referencing in nlmixr2, which I call mu2. What is mu referencing in nlmixr2 mu-referencing is combining a fixed effect, random effect and possibly a covariate in the form: [ \theta_\mathsf{pop}+\eta_\mathsf{individual}+\theta_\mathsf{covariate}\times \mathsf{DataCovariate} ] Often they are placed in exponentials for these to be log-normally distributed like: [ \exp\left(\theta_\mathsf{pop}+\eta_\mathsf{individual}+\theta_\mathsf{covariate}\times \mathsf{DataCovariate}\right) ] In optimization routines like saem, these are switched out with a single parameter during optimization classically called (\phi) in both NONMEM and Monolix.

nlmixr2 2.1.2/ rxode2 2.1.3

Both nlmixr2 and rxode2 have been updated, the below describes all the nlmixr2 related packages (maintained by the nlmixr2 team). Most of items in this release are bug fixes. One of the changes will make random number generation platform independent. Unfortunately, this means simulations from within rxode2/nlmixr2 will have different numbers drawn from random distributions but I think platform independence is important enough to push this change through. Versions of new packages nlmixr2 2.

nlmixr2/rxode2 user functions

One of the exciting new features of the recent rxode2 is user functions. This allows you to define your own R functions for use in nlmixr2 or rxode2. This new feature can really help make your code more concise by reusing custom transformations or apply more complex routines. This can call R functions directly, but at a cost – single threaded and slower execution. However, you can reduce the cost by converting the R functions to C automatically with rxFun().

nlmixr2/rxode2 steady state changes

One of the things that I changed in the last release was steady state. Once I created the nonmem2rx package, I searched for NONMEM control streams that we could test the import from, especially those with attached data. I ran across nmtests that uses NONMEM to test against mrgsolve and how it behaves. During that test I noticed that rxode2 did not follow the convention of NONMEM in lagged steady state doses.

nlmixr2, tidyverse and RStudio on AWS

Running large population PK/PD analyses on laptops and desktops often requires long computational times. This is quite tedious. In addition, when using parallel computing on your machine, it can slow it down for a while, creating further nuisances. Outsourcing computation to the cloud is a solution to this problem. Among the various cloud providers, Amazon Web Service (AWS) is one of the most famous and used by industries in various fields.

nlmixr2 2.1.0+ new estimation methods

nlmixr2 2.1.0 was released and I promised to talk about the new features. One of the things that can impact many peoples work-flow is new estimation methods for population-only data. Many people use population-only estimation methods before changing the model to a mixed effect model, so I believe these can be useful for many people trying to find the best model to the data at hand. I will talk about the new ones (and why you may want to use them).

nlmixr2 2.1.0/ rxode2 2.1.1

nlmixr2 2.1.0 was released 9 Jan 2024 which requires the newest (and recently released) engine packages nlmixr2est 2.2.0 (released 12 Dec 2023) and rxode2 2.0.10 (released 13 Dec 2023). I will be blogging about a few new features but want to mention a few now: More flexible mu referencing User defined functions can now be used with nlmixr2 and rxode2 Event handling changes Many new estimation methods for population only fitting The truncated changelog for these packages are below:

nonmem2rx and babelmixr2

nonmem2rx/babelmixr2 I am really excited to announce that the nlmixr2 team has released a new version of babelmixr2 and a new package nonmem2rx that allows you to convert NONMEM to rxode2 or even a nlmixr2 object. To install, simply upgrade babelmixr2 with: install.packages(c("nonmem2rx", "babelmixr2")) What you can do with nonmem2rx/babelmixr2 You can do many useful tasks directly converting between nlmixr2 and NONMEM models; you can: Convert a NONMEM model to a rxode2 model

nlmixr2 family releases

This is another release of a group of nlmixr2-related packages. Feature Highlights There are a few things I would like to highlight in this release: Highly requested feature(s) A much requested feature has been added for rxode2; Diagonal zeros in the omega and sigma matrices are treated as zeros in the model. The corresponding omega and sigma matrices drop columns/rows where the diagonals are zero to create a new omega and sigma matrix for simulation.

Lag-time with NONMEM and nlmixr2

This is more of a methodology post, pointing out how things are done in nlmixr2 and how it likely doesn’t match what is done in NONMEM (and at least one reason why a drop-in replacement of rxode2 by another tool like PKPDsim, mrgsolve, or deSolve is not an easy project). For the impatient, adding focei lag time (and other dose-based events) have improved in stability for this release of nlmixr2.

nlmixr2 2.0.8 Objectively Surprising

Last time I blogged promised to talk about a few other things, including: Likelihood based on each observation (and how to get it) Standard Errors / Hessians, etc for between subject variabilities or etas (and how to get them) Hessians for the individual between subject variability is also used for the focei calculation. So, if you are impatient, I will give you brief instructions on where to get each component of the likelihood:

nlmixr2 2.0.8 log-likelihood

I am pretty excited abut the new nlmixr2 release (2.0.8). When I joined the the nlmixr2 team, I wanted to do a fancy heavy tailed, skewed model in an open source tool so I could figure out how to do even more with it. With this release, it is possible to do a heavy tailed (t-distribution dt()) skewed (coxBox(lambda)) distribution: my old wish is now possible with focei! A few other things that people may be interested in are:

nlmixr2 is here

Over the past half year, a lot of changes have been happening behind the scenes, and the time has finally come to reveal them! nlmixr2 nlmixr2 will be the version in active development going forward, taking over from nlmixr, starting with the current CRAN version, 2.0.6. Our new home on GitHub is here, and on CRAN, we’re here. The reasons for the name and format change are many, but most importantly, we’ve taken this step to improve overall user experience and to help us maintain the project more effectively.