Unlimited learning, half price | 50% off
Get 50% off unlimited learning

⚠️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.

Feedback

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

Install ggPMX

Github version:

devtools::install_github(  "ggPMXdevelopment/ggPMX")

CRAN:

sumbitted to CRAN. Coming soon...

Vignette

First step is to explore vignette

vignette("ggPMX-guide",pack="ggPMX")

Copy Link

Version

Install

install.packages('ggPMX')

Monthly Downloads

440

Version

0.9.3

License

GPL-2

Issues

Pull Requests

Stars

Forks

Maintainer

Amine Gassem

Last Published

May 26th, 2019

Functions in ggPMX (0.9.3)

eta_cov

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

Eta Covariates plots
add_draft

Add draft layer annotation
get_strats

Get extra stratification variables
distrib

creates a graphic distribution object
get_data

Get controller data set
ggPMX

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

Load data set
get_occ

Get controller occasional covariates
load_source

Load all/or some source data set
individual

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

Remove named elements from gtable
plot_pmx.distrib

Plot EBE distribution
plot_names

Get plot names
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
pmx_config

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

Plot shrink in eta matric
plot_pmx

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

Eta distribution plots
facet_wrap_paginate

Split facet_wrap over multiple plots
plots

Get plots description
pmx_endpoint

Creates pmx endpoint object
pmx_filter

filter data in a pmx controller
getPmxOption

Get ggPMX Option
pmx_plot_iwres_dens

IWRES density plot
eta_pairs

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

Get abbreviation definition by key
get_cats

Get category covariates
input_finegrid

Merge input and fingrid data sets
is.pmx_gpar

Check if an object is a pmx_gpar class
plot_pmx.pmx_dens

This function plot EBE versus covariates using qq plots
plot_pmx.pmx_gpar

The ggPMX base plot function
pmx_plot_vpc

VPC plot
pmx_bloq

Creates BLOQ object attributes
pmx_copy

Creates a deep copy of the controller
pmx_get_configs

Get List of built-in configurations
pmx_gpar

Handling pmx Graphical parameters
pmx_comp_shrink

Compute Shrinkage
pmx_plot_individual

Individual plot
pmx_plot_eta_matrix

Eta matrix plot
pmx_register_plot

Register plot
pmx_vpc_rug

Sets vpc rug layer
pmx_report

Generates ggpmX report from a pre-defined template
print.abbreviation

S3 print abbreviation
print.pmxConfig

S3 method print pmxConfig object
print.pmx_gpar

Print pmx_gpar object
get_plot_config

Get the plot config by name
get_plot

Get plot object
print.configs

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

Merge 2 lists
print.pmxClass

Print pmxClass object
read_mlx_par_est

Read MONOLIX parameter estimation file
read_mlx_pred

Read MONOLIX model predictions
load_config

Obtain the data source config
plot_pmx.eta_pairs

Plot random effect correlation plot
plot_pmx.individual

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

Gets build-in report templates
plot_pmx.pmx_qq

This function plot EBE versus covariates using qq plots
pmx_settings

Create controller global settings
pmx_cov

Select/Map covariates using human labels
pmx_dens

Creates a density plot object
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.
set_data

Set a controller data set
set_plot

Create a new plot of the desired type
pmx_sim

Create simulation object
pmx_vpc

Creates vpc object
pmx_theme

Define ggPMX theme
pmx_update

Update plot object
residual

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

Objects exported from other packages
[.pmx_gpar

Method for subsetting "pmx_gpar" objects
pmx_vpc_bin

Creates vpc bins
theophylline

Creates pmx controller using theophylline data
FacetWrapPaginate

Extend facet_wrap using ggproto
abbrev

Give the whole abbreviation definition
get_covariates

Get covariates variables
get_conts

Get continuous covariates
n_pages

Determine the number of pages in a paginated facet plot
parse_mlxtran

Parse MONOLIX mlxtran file
pk_pd

Creates pkpd pmx controller using package internal data
pk_occ

Creates pmx controller using monlix data having Occasional variable
pmx_vpc_ci

Sets vpc confidence interval layer
pmx

Create a pmx object
pmxOptions

This function can be used to set ggPMX options
pmx_plot

Generic pmx plot
read_input

Read Modelling input data
pmx_plot_cats

Generic pmx stratified plot
pmx_qq

This function creates a qq plot object
pmx_qq_plot

Quantile-quantile plots
set_abbrev

update or add a new abbreviation
pmx_vpc_pi

Sets vpc percentile layer
residual_scatter

Scatter residual plots
pmx_vpc_obs

Sets vpc observation layer
read_mlx_ind_est

Read MONOLIX individual parameters
wrap_formula

merge facets formula with new formula