-
Notifications
You must be signed in to change notification settings - Fork 2
/
README.Rmd
94 lines (67 loc) · 2.21 KB
/
README.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
---
output:
github_document
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r, echo = FALSE, message=FALSE}
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 <img id="logo" src="pkgdown/pmxploit.svg" alt="pmxploit" width="125px" align="right" />
[![CRAN status](https://www.r-pkg.org/badges/version/pmxploit)](https://cran.r-project.org/package=pmxploit)
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
``` r
# Install the latest version from GitHub
# install.packages('devtools')
devtools::install_github('pnolain/pmxploit')
```
## Getting started
```{r, eval = FALSE}
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
```{r dv_vs_pred}
plot_dv_vs_predictions(run, compartment = 2L, predictions = c("PRED", "IPRED"),
x_scale = "log", y_scale = "log")
```
```{r residuals}
plot_residuals(run, compartment = 2L, residuals = "CWRES", idv = c("TIME", "PRED"))
```
```{r residuals2, fig.height=7}
run %>%
group_by(CMT) %>%
plot_residuals(compartment = c(2L, 3L), residuals = "CWRES", idv = c("TIME", "PRED"))
```
### Parameters
```{r convergence, message=FALSE}
plot_convergence(run, parameters = "theta")
```
```{r}
run %>%
summarize_thetas()
```
```{r}
run %>%
summarize_omega()
```
```{r}
run %>%
summarize_shrinkage(type = "ETA")
```