knitr::opts_chunk$set(collapse = TRUE,
                      comment = "#>",
                      fig.path   = 'man/figures/',
                      fig.align  = 'center',
                      out.width  = '80%', 
                      dev        = 'png',
                      dev.args   = list(type = 'cairo'))

library(tidyverse)
library(pmxploit)
theme_set(theme_minimal())

run <- pmxploit::EXAMPLERUN

pmxploit

CRAN status

The goal of pmxploit is to facilitate the post-processing analysis of non-linear mixed effects models developed with NONMEM software.

It provides helper functions for visualizing and summarizing population analyses results, detecting outliers, computing numerical quality criteria and comparing multiple run results.

Requirements

pmxploit can read runs executed with NONMEM 7.2 and higher (with results data contained in an xml file).

Installation

# Install the latest version from GitHub
# install.packages('devtools')
devtools::install_github('pnolain/pmxploit')

Getting started

library(pmxploit)

# load a NONMEM run from its location
run <- load_nm_run("~/pmxploit/example")

# or from an archive file
# run <- load_nm_run("~/pmxploit/example.tar.gz")

Diagnostic plots

plot_dv_vs_predictions(run, compartment = 2L, predictions = c("PRED", "IPRED"),
                       x_scale = "log", y_scale = "log")
plot_residuals(run, compartment = 2L, residuals = "CWRES", idv = c("TIME", "PRED"))
run %>%
  group_by(CMT) %>%
  plot_residuals(compartment = c(2L, 3L), residuals = "CWRES", idv = c("TIME", "PRED"))

Parameters

plot_convergence(run, parameters = "theta")
run %>% 
  summarize_thetas()
run %>% 
  summarize_omega()
run %>% 
  summarize_shrinkage(type = "ETA")


pnolain/pmxploit documentation built on Jan. 31, 2024, 1:16 p.m.