2022 - Ljubljana - Slovenia

PAGE 2022: Software Demonstration
Bruno Bieth

ggPMX: re-imagine diagnostics plots

B. Bieth (1), M. Fidler (2), I. Baltcheva (1)

(1) Pharmacometrics, Novartis, Basel, Switzerland (2) Pharmacometrics, Novartis, Fort Worth, USA

Introduction:

ggPMX is an open-source R package freely available on CRAN. It builds on the R-package ggplot2 and provides a library of reproducible diagnostic plots needed for longitudinal population model building and validation. The package aims at providing a workflow that is consistent and efficient, resulting in high quality graphics ready-to-use in submission documents and publications. ggPMX enables straightforward generation of PDF, Word or PNG output files that contain all diagnostic plots for keeping track of modeling results. The library is the only model diagnostics R package currently compatible with three non-linear mixed-effect model fitting software: Monolix, NONMEM and nlmixr.

Methods:

ggPMX implementation uses object-oriented programming, which allows having code that is modular and easy to customize. The architecture consists of the following four components:

  • Reader - reads model outputs from different sources (i.e. text files containing population parameters, model predictions, individual random effects, simulations and data-related inputs like covariates) and restructures these outputs into standard formats, which can be easily processed by the Generator.
  • Generator - processes outputs from Reader and produces the diagnostic plots. A set of default plots is defined in a configuration file. The configuration file can be adapted, e.g., to have different configurations for different types of modeling activities (health authority submission, publication, internal report).
  • Controller - serves as user interface. The user will call Generator functions via the Controller to produce either the default plots or customized versions.
  • Reporter - generates sets of graphs and tables as individual PNG files and integrates them all into one single output document (Word or PDF) with annotations pointing to the locations of the individual PNG files. The report generation is based on RMarkdown, which enables the user to create his own report template.

The most important task for the user is the Controller creation. This is the step where the user defines which model variable and which covariates to consider for the diagnostic session. Once the Controller is created, the user can display the graphs by calling pre-defined functions. The same syntax is used independently of the model structure or of the fitting software.

Results: 

Using simple syntax, the toolbox produces various model diagnostics such as residual- and empirical Bayes estimate (EBE)-based plots, distribution plots, prediction- and simulation-based diagnostics (visual predictive checks). In addition, shrinkage and summary parameters table can be also produced. By default, the output file generated by the Reporter contains essential goodness-of-fit plots. However, these can be adapted to produce different sets of diagnostics as desired by the user, and any of the plots may be customized individually. The types of supported customizations include modifications of the graphical parameters, labels, and various stratifications by covariates.

Conclusions: 

The ggPMX R package generates standard diagnostic plots for mixed effect models used in pharmacometrics activities. The tool is built upon ggplot2 and currently supports models developed with Monolix, NONMEM and nlmixr.

 



References:
[1] Text for reference 1.
[2] Text for reference 2, etc etc


Video link:
https://drive.google.com/file/d/1Lr-IVyEcNI0Hyl1M0u23qu7VJfwuzH-y/view?usp=sharing
Reference: PAGE 30 (2022) Abstr 9998 [www.page-meeting.org/?abstract=9998]
Software Demonstration
Top