Try Our Suite of Open Source Tools

We’re strong advocates of open-source software development efforts, and we make many of the tools we’ve developed for our own work available as free, open-source software under GPL.

If you use these tools in your work, please acknowledge Metrum Research Group, Tariffville, CT 06081 in any derived documents. Some of the tools are associated with peer-reviewed publications, which are indicated with each distribution, and should also be referenced.


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, during both model development and decision-making phases of a drug development program.


Metrum Package Network

A curated, reproducible R package environment:

  • Open repository of ~1000 packages specific to PMX sourced from CRAN and github
  • Compatibility and stability tested
  • Binaries for Windows and MacOS across multiple versions of R
  • Immutable repository
  • Freely available and accessible to all

MeRGE Expo

Explore MeRGE Expos for a practical introduction to M&S analysis, featuring step-by-step guidance, traceable research, sample code access, and our suite of open-source tools.


A user-friendly interface between R and NONMEM® to manage, track, and report modeling activities through simple R objects. Users can submit models, consume outputs and diagnostics, and iterate on models. bbr provides simple tagging and model inheritance trees to support the replication and external review of your work. bbr makes model development more efficient, reproducible, and traceable.

Get bbr

 

bbr.bayes, an extension of the bbr package, seamlessly integrates with Stan and NONMEM Bayesian estimation methods. It enables modelers to take advantage of advanced Bayesian modeling techniques, while leveraging bbr’s capabilities for model management, traceability, and reproducibility.

Get bbr.bayes

 

pkgr is a rethinking of the way packages are managed in R. Namely, it embraces the declarative philosophy of defining an ideal state of the entire system and works towards achieving that objective. pkgr is built with a focus on reproducibility and auditability of what is going on, a vital component for the pharmaceutical sciences + enterprises.  More details here.

Get pkgr

mrgda – Metrum Research Group Data Assembly – is a robust data programming tool engineered to seamlessly consolidate diverse clinical trial data into meticulously structured, analysis-ready datasets. mrgda accelerates the data assembly process, freeing up your valuable time for in-depth analysis and decision making.

Get mrgda

 

Tables for pharmacometrics. pmtables is an R package that allows you to summarize data sets and create publication-quality tables for inclusion in ‘tex’ documents.

Get pmtables

 

pmparams enables users to extract, organize, and present parameter estimates with ease and clarity. This package streamlines the annotation and formatting of these tables–especially when integrated with bbr and pmtables–resulting in comprehensive reports capturing model nuances and accurate and easy-to-understand parameter estimate tables.

Get pmparams

 

Torsten is a collection of Stan functions to facilitate analysis of pharmacometric data using Stan, a flexible open-source software platform for Bayesian data analysis using Hamiltonian Monte Carlo (HMC) simulation – a type of MCMC Simulation.

The current version of Torsten includes functions for:

  • Specific linear compartment models:
    • One compartment model with first-order absorption.
    • Two compartment model with elimination from and first-order absorption into central compartment
  • General linear compartment models described by systems of first-order/underline {linear} ordinary differential equations (ODE).
  • General compartment models described by a system of first-order ODEs.
  • Mixed compartment models with a PK forcing function described by linear one or two compartment model.

Torsten provides Stan language functions that calculate amounts in each compartment, given an event schedule and an ODE system. The models and data format are based on NONME®/NMTRAN/PREDPP conventions. The most recent versions of Torsten support within chain parallel computation for models that require numerical solution of ODEs.

Get Torsten

 

An R package for reading, parsing, and modifying NONMEM control records. Its purpose is to support scripted and programmatic manipulation of mathematical model definitions, eliminating the need for manual, piece-by-piece adjustments. While not prominently used by end-users, it serves as a behind-the-scenes utility in several other packages, to support efficiently and reliably working with NONMEM.

Get nmrec

 

mpn.scorecard is an influential tool that aids in the evaluation of R packages for inclusion in the Metrum Package Network (MPN). By assessing key attributes and the risk associated with inclusion in the network, mpn.scorecard eliminates ambiguity and subjectivity, providing a clear and quantifiable assessment of a package’s reliability and quality.

Get mpn_scorecard

 

Data specifications, wrangling, and documentation.Use yspec to document analysis data sets and utilize data attributes in a modeling and simulation workflow.

Get yspec

 

Plots for pharmacometrics. pmplots provide light wrappers around ‘ggplot2’ plotting code tailored for pharmacometric applications.

Get pmplots

 

Forest plots for pharmacometrics. pmforest is an R package to create forest plots, a visualization tool for identified variables of interest.

Get pmforest

 

Efficiently computes recent dose timing and amount within clinical trial datasets. Improves time since last dose calculations, outperforming manual methods. Designed for time-based data.

Get lastdose