(W-088) pmparams: an R Package for Defining and Formatting Parameter Tables in Pharmacometric Modeling
Wednesday, November 13, 2024
7:00 AM – 1:45 PM MST
Eric Anderson, M.S. – Senior Data Science Engineer I, Metrum Research Group; Michael McDermott, M.E. – Data Scientist II, Metrum Research Group; Kyle Barrett, M.S. – Data Science Engineer II, Metrum Research Group; Kyle Baron, Pharm.D., Ph.D. – Group Leader PKPD, Principal Scientist II, Metrum Research Group; Timothy Waterhouse, Ph.D. – Group Leader Statistics, Principal Scientist II, Metrum Research Group; Seth Green, M.S. – Manager, Data Science Engineering, Metrum Research Group; Katherine Kay, Ph.D. – Senior Scientist, Manager Science Communications, Metrum Research Group
Data Scientist II Metrum Research Group, United States
Objectives: A key output of pharmacometric modeling is an informative, well-formatted table summarizing the estimated parameters. For each parameter, users must define all names and units, calculate confidence intervals (CIs) and/or relative standard errors (RSE), and perform any required back-transformations; an essential but often tedious and time-consuming activity. The aim was to provide a simple, reproducible, and traceable method for generating parameter tables in R for NONMEMⓇ models. Attained via a new package (pmparams): a stable and easy-to-use tool intended to integrate with, and extend the functionality of, existing packages in the Metrum Research Group Ecosystem (MeRGE) [1].
Methods: pmparams is an open-source R package [2] to define consistent and well-formatted parameter tables for NONMEMⓇ models that leverage existing features of MeRGE packages (bbr [3], pmtables [4]). Metrum Research Group applied a transparent software development life cycle with robust planning, iterative development, testing, validation, and release. The R package was formally documented and included a comprehensive test suite. New features are continually added to refine and expand package applications.
Results: To create a parameter table, users pass a data frame of raw parameter estimates and a parameter key to pmparams functions, creating a well-formatted data frame of transformed parameter estimates in two steps. Briefly, pmparams joins the parameter estimates to the parameter key and provides functions for common tasks (e.g., calculating CIs, RSEs, coefficient of variations, or transforming parameters estimates (log or logit scales)). Parameter estimate data frames can be generated manually or conveniently extracted from a NONMEMⓇ run using bbr. The parameter key (commonly defined in YAML format) includes: parameter abbreviations and units (including Greek symbols via LaTeX if desired), descriptive names, panel labels for parameter type (e.g., “structural”, “covariate”, etc.), and required transformations. Defining the parameter key in a YAML file, rather than in the model control file, provides additional flexibility to update the parameter table without modifying the control stream. If the underlying model structure is unchanged, a single parameter key can often be used to make tables for the base model, covariate model, and bootstrap runs (where pmparams also summarizes the variability of bootstrap estimates). The pmparams output (a data frame) can be passed to pmtables to seamlessly render a report-ready table (.tex, .png, or .jpeg file).
Conclusions: The pmparams R package is a flexible tool for creating reproducible, traceable, report-ready parameter tables for pharmacometric modeling. Future releases will focus on parameter tables for Bayesian models run using Bayesian estimation methods in NONMEMⓇ or Stan.