pmparams: an R Package for Defining and Formatting Parameter Tables in Pharmacometric Modeling
Authors: O'Brien Grace , Anderson Eric , McDermott Michael , Barrett Kyle , Baron Kyle , Waterhouse Timothy , Green Seth , Kay Katherine 
Published: February 2025

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.Citations: [1] https://merge.metrumrg.com/expo/expo1-nonmem-foce[2] https://github.com/metrumresearchgroup/pmparams[3] https://github.com/metrumresearchgroup/bbr[4] https://github.com/metrumresearchgroup/pmtables