Perl speaks NONMEM (PsN)
Rikard Nordgren (1), Sebastian Ueckert (1), Gunnar Yngman (1), Piyanan Assawasuwannakit (1), Andrew C. Hooker (1) and Mats O. Karlsson (1)
(1) Department of Pharmaceutical Biosciences, Uppsala University, Sweden
PsN [1][2][3] is an open source toolbox for population PK/PD model building using NONMEM. It has broad functionality ranging from results extraction to advanced computer-intensive statistical methods. PsN simplifies the organization of NONMEM output files, helps with starting jobs on different types of clusters (i.e. slurm, torque, sge and lsf) and can perform a cornucopia of different statistical, computational and other methods, including: benchmark – combinatoric benchmarking of different NONMEM control stream settings, bootstrap – assessing uncertainty of parameter estimates, cdd – case deletion diagnostic to look for influential individuals, crossval – model cross validation, frem – full random effects modelling, llp – log likelihood profiling, nmoutput2so – converting NONMEM results into the standard output file format, parallel_retries – estimate the same model multiple times with different initial parameter estimates, qa – fast and automatic assumption assessment and quality assurance of models, resmod – residual modelling for quickly assessing appropriateness of structural and residual error models, scm – stepwise covariate model, simeval – simulation evaluation diagnostics of outliers, sir – sampling importance resampling for parameter uncertainty assessment, sse – stochastic simulation and estimation, transform – do changes to a model programmatically and vpc – visual predictive check.
Updates to PsN since PAGE 2018 include improvement of the qa tool. Extensive testing of many different input models has been performed and improvements to tools used by qa has been made to support a wider range of ways of coding models. Efforts has also been put in to make the output of qa easier to understand and interpret. The R code included in PsN for the automatic plotting via the -rplots functionality has been moved in parts to a new R package called “PsNR”. This makes it easier to install other R package dependencies. The installation of PsNR can be done at PsN install time or at any time before or later using the R devtools package. Minor uppdates include the addition of the new clean-level 5, the common option debug_rmd to retain the tex file adter rendering rmarkdown with -rplots and a stratification option for cross validation.
PsN can automatically generate plots for most of the different tools by adding the -rplots option. This automatically generates documents with, for example, visual predictive checks as part of the PsN output, without the need to manually run any R script. Many of these plots use functionality in the Xpose4 R package [4]. It is possible to customize the plots or replace them entirely by using custom R templates. These templates can either be plain R or R Markdown.
PsN is freely available at https://uupharmacometrics.github.io/PsN, the userguides for the different tools can be found at https://uupharmacometrics.github.io/PsN/docs.html and the new R package needed for R plots can be found at https://github.com/UUPharmacometrics/PsNR.
References:
[1] Lindbom L, Ribbing J, Jonsson EN. Perl-speaks-NONMEM (PsN)--a Perl module for NONMEM related programming. Comput Methods Programs Biomed. 75(2):85-94.
[2] Lindbom L, Pihlgren P, Jonsson EN. PsN-Toolkit--a collection of computer intensive statistical methods for non-linear mixed effect modeling using NONMEM. Comput Methods Programs Biomed. 79(3):241-57.
[3] Keizer RJ, Karlsson MO, Hooker A. Modeling and Simulation Workbench for NONMEM: Tutorial on Pirana, PsN, and Xpose. CPT Pharmacometrics Syst Pharmacol. (2013) 2, e50.
[4] Jonsson EN, Karlsson MO. Xpose--an S-PLUS based population pharmacokinetic/pharmacodynamic model building aid for NONMEM. Computer Methods and Programs in Biomedicine. 58(1):51-64.