ISoP ISoP on Twitter | ACoP ACoP on Twitter | PAGE | WCoP | PAGANZ | PAGJa

Simulation from PK/PD and systems pharmacology models in R with mrgsolve (May 13th Noon EDT)



Background Resources for the Audience:

User Guide:

mrgsolve facilitates simulation in R from hierarchical, ordinary differential equation (ODE) based models typically employed in drug development. The modeler creates a model specification file consisting of R and C++ code that is parsed, compiled, and dynamically loaded into the R session. Input data are passed in and simulated data are returned as R objects, so disk access is never required during the simulation cycle after compiling.

Features include:

  • NMTRAN-like input data sets
  • Bolus, infusion, compartment on/off and reset functionality
  • Bioavailability, ALAG, SS, II, ADDL, MTIME
  • Multivariate normal random effects simulated using RcppArmadillo
  • Compatible with parameter estimation and design packages in R (nlme, saemix, PopED, PFIM)
  • Integration with data summary (dplyr) and plotting (ggplot, lattice) packages
  • Parallelization with existing R infrastructure (mclapply) or Sun Grid Engine (qapply)
  • Compatible with output from many different model estimation platforms
  • Easily integrated with Shiny to create model-visualization applications
  • mrgsolve is a powerful and efficient tool for simulation from ODE-based PK/PD and systems pharmacology models. The resulting computational efficiency facilitates model exploration and application, both during model development and decision-making phases of a drug development program.


@kyleb when you have the link to the livefeed, let me know and I will add it to the topic.


I put it in the proposal:


Please post your webinar related questions here


We’ll get started in ~5 min.


in line 102, you have ID=1 and pass in three amounts but the resulting dataset has 3 ID’s. Just checking if that is the default incrementor for ID based on number of amounts


Can we simulate discrete data models, and can we use the native R or RCPP statistical distributions in the modeling workflow?


Thank you Kyle. Great talk, I will be pulling down from GitHub shortly.


Nice talk, Kyle. Thanks!


I think the StudyGroup is going to archive materials from all of the sessions. I also made the R code available here:

You might have to “right-click / Save Link As” on the demo.html file; it’s big enough that github might not give it to you by just clicking on the link.