Learn R Programming

⚠️There's a newer version (1.2.11) of this package.Take me there.

ggPMX R package

ggPMX is an open-source R package freely available on CRAN since April 2019. It generates standard diagnostic plots for mixed effect models used in pharmacometric activities. The package builds on the R-package ggplot2 and aims at providing a workflow that is consistent, reproducible and efficient, resulting in high quality graphics ready-to-use in submission documents and publications. Intuitive functions and options allow for optimal figure customization and graphics stratification. ggPMX enables straightforward generation of PDF, Word or PNG output files that contain all diagnostic plots for keeping track of modeling results. The package is currently compatible with Monolix versions 2016 and 2018R1.

Using simple syntax, the toolbox produces various goodness-of-fit 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 tables can be also produced. By default, the PDF- or Word-format diagnostic report 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.

Documentation

Vignette

Install ggPMX

CRAN:

install.packages("ggPMX")

Github version:

devtools::install_github("ggPMXdevelopment/ggPMX")

Feedback

ggPMX is now ready for inputs and enhancements by the pharmacometric community.

Copy Link

Version

Install

install.packages('ggPMX')

Monthly Downloads

474

Version

0.9.4

License

GPL-2

Issues

Pull Requests

Stars

Forks

Maintainer

Amine Gassem

Last Published

June 6th, 2019

Functions in ggPMX (0.9.4)

FacetWrapPaginate

Extend facet_wrap using ggproto
eta_cov

This creates an ETA covariance matrix which can be used to define the co-relation between the parameters and its shrinkage..
facet_wrap_paginate

Split facet_wrap over multiple plots
eta_pairs

This creates an eta correlation which defines the relationship between parameters
eta_distribution_plot

Eta distribution plots
distrib

creates a graphic distribution object
add_draft

Add draft layer annotation
eta_cov_plot

Eta Covariates plots
getPmxOption

Get ggPMX Option
abbrev

Give the whole abbreviation definition
get_abbrev

Get abbreviation definition by key
get_data

Get controller data set
parse_mlxtran

Parse MONOLIX mlxtran file
n_pages

Determine the number of pages in a paginated facet plot
gtable_remove_grobs

Remove named elements from gtable
individual

This function can be used to obtain individual prediction and compare with observed data and population prediction for each individual separately
get_plot_config

Get the plot config by name
get_plot

Get plot object
plot_pmx.individual

This function can be used to plot individual prediction and compare with observed data and population prediction for each individual separately
plot_pmx.eta_pairs

Plot random effect correlation plot
get_conts

Get continuous covariates
is.pmx_gpar

Check if an object is a pmx_gpar class
get_occ

Get controller occasional covariates
plot_names

Get plot names
pmx_bloq

Creates BLOQ object attributes
input_finegrid

Merge input and fingrid data sets
pk_occ

Creates pmx controller using monlix data having Occasional variable
pk_pd

Creates pkpd pmx controller using package internal data
get_covariates

Get covariates variables
get_cats

Get category covariates
plot_pmx

This is a generic plot method that produces all plots by default described in pmx model evaluation guidance.
get_strats

Get extra stratification variables
pmx_comp_shrink

Compute Shrinkage
pmx_gpar

Handling pmx Graphical parameters
pmx_theme

Define ggPMX theme
print.configs

This function can be used to print configuration of the defined object using S3 method.
print.pmxClass

Print pmxClass object
pmx_get_configs

Get List of built-in configurations
pmx_sim

Create simulation object
l_left_join

Merge 2 lists
ggPMX

ggPMX: A ggplot2 toolbox for Nonlinear Mixed-Effect Model graphical
pmx

Create a pmx object
load_config

Obtain the data source config
pmxOptions

This function can be used to set ggPMX options
pmx_register_plot

Register plot
pmx_plot_individual

Individual plot
pmx_plot_eta_matrix

Eta matrix plot
plot_pmx.pmx_qq

This function plot EBE versus covariates using qq plots
load_data_set

Load data set
pmx_plot

Generic pmx plot
load_source

Load all/or some source data set
plot_pmx.distrib

Plot EBE distribution
plot_pmx.residual

This function plots residual for each observed value by finding the difference between observed and predicted points. It also fits a distribution to the residual value.
plot_pmx.pmx_dens

This function plot EBE versus covariates using qq plots
plot_shrink

Plot shrink in eta matric
plots

Get plots description
pmx_endpoint

Creates pmx endpoint object
plot_pmx.pmx_gpar

The ggPMX base plot function
print.pmxConfig

S3 method print pmxConfig object
[.pmx_gpar

Method for subsetting "pmx_gpar" objects
pmx_config

This function can be used to define the pmx configuration used in plots. e.g. Monolox/Nonmem
pmx_copy

Creates a deep copy of the controller
print.pmx_gpar

Print pmx_gpar object
pmx_plot_cats

Generic pmx stratified plot
pmx_plot_iwres_dens

IWRES density plot
reexports

Objects exported from other packages
pmx_plot_vpc

VPC plot
pmx_vpc_obs

Sets vpc observation layer
residual

This function create a residual for each observed value and also generates a residual distribution
pmx_filter

filter data in a pmx controller
theophylline

Creates pmx controller using theophylline data
pmx_vpc_bin

Creates vpc bins
set_abbrev

update or add a new abbreviation
pmx_report

Generates ggpmX report from a pre-defined template
pmx_vpc_ci

Sets vpc confidence interval layer
residual_scatter

Scatter residual plots
pmx_report_template

Gets build-in report templates
pmx_update

Update plot object
pmx_settings

Create controller global settings
pmx_vpc

Creates vpc object
read_input

Read Modelling input data
pmx_dens

Creates a density plot object
pmx_cov

Select/Map covariates using human labels
plot_pmx.eta_cov

This plots an ETA covariance matrix which can be used to define the co-relation between the parameters and its shrinkage
print.abbreviation

S3 print abbreviation
pmx_qq_plot

Quantile-quantile plots
pmx_vpc_rug

Sets vpc rug layer
pmx_qq

This function creates a qq plot object
read_mlx_par_est

Read MONOLIX parameter estimation file
pmx_vpc_pi

Sets vpc percentile layer
read_mlx_ind_est

Read MONOLIX individual parameters
set_data

Set a controller data set
set_plot

Create a new plot of the desired type
read_mlx_pred

Read MONOLIX model predictions
wrap_formula

merge facets formula with new formula