Loading NONMEM Output Files with Functions for Visual Predictive Checks (VPC) and Goodness of Fit (GOF) Plots

Loading NONMEM (NONlinear Mixed-Effect Modeling, < http://www.iconplc.com/innovation/solutions/nonmem/>) and PSN (Perl-speaks-NONMEM, < https://uupharmacometrics.github.io/PsN/>) output files to extract parameter estimates, provide visual predictive check (VPC) and goodness of fit (GOF) plots, and simulate with parameter uncertainty.


nonmem2R v0.2.1 (Release date: 2019-02-18)

NEW functions:

  • A set of function for goodness-of-fit (GOF) have been added. Targeting nonmem output tables ( sdtab,cotab,catab..) to provide basic GOF plots for observations vs population and individual predictions, residuals (CWRES), ETA's, numerical and categorical covariates. See the vignette "GOFvignette"

The functions have e.g. functionality for adding caption which also have been added to vpcfig2 and vpcfig3.


  • Using global package variable to specify the model folder instead of looking for the variable "model.path" holding the path to model files, the function set.model.path is used set the folder path.

  • vpcfig2: Added parameter param bin.idv to either use median of independent variable on x-axis (default), or to use midpoint of bins on x-axis.

  • vpcfig2: Added argument median.only to only display median (median.only=TRUE) or display both quantile (e.g. 5 and 95%) and median (median.only=FALSE, this is the default)

  • vpcfig3: Added ... parameter to vpcfig3 that are passed to loess.smooth

  • Update of systemNM for SCP

  • Bug fix for modload. Previuous version did not run when using model.path.

  • Fixed issue for vpc folders with multiple vpc_results and vpctab files (e.g. vpc_results-old1, vpctab-old1). Now only filesnames NOT containing "old" are loaded.


  • Handling of LOQ data in vpcfig2

nonmem2R v0.1.10 (Release date: 2018-09-26)


  • Added vpcfig3 for creating multiple VPC plots from one single PSN vpc output file

  • Added modload for loading model file and print on screen

  • Added stat_QQnorm for Quantile-Quantile plots with ggplot2

  • Added stat_QQCL for confidence intervals for Quantile-Quantile plots with ggplot2

  • Updated vpgfig2; now using geom_ribbon (instead of geom_polygon) for drawing model confidence intervals. This means x-axis limits can be set by e.g. xlim or scale_x_continuous. (Previous version using geom_polygon required using coord_cartesian for setting axis limits to avoid a corrupted VPC.)

nonmem2R v0.1.9 (Release date: 2018-04-06)


  • Added model.path argument to vpcfig & vpcfig2, with similar use of model.path as in e.g. sumoR & extload

  • Add footnote extToTable to keep track if OMEGA and SIGMA are reported as variances or as standard-deviations

  • Updated covload to handle cov files with multiple tables from NONMEM model files with multiple $COV and/or multiple $EST.

  • Fixed column names for covload output

  • Updated help-page for vpcfig2 with advice for setting axis limits

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.


0.2.1 by Magnus Astrand, a month ago

Browse source code at https://github.com/cran/nonmem2R

Authors: Magnus Astrand

Documentation:   PDF Manual  

Unlimited license

Imports mvtnorm, lattice, latticeExtra, MASS, splines2, reshape2

Depends on ggplot2, gridExtra

Suggests knitr, rmarkdown

See at CRAN