-
Notifications
You must be signed in to change notification settings - Fork 29
/
README.Rmd
executable file
·104 lines (76 loc) · 3.36 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
94
95
96
97
98
99
100
101
102
103
104
---
output: github_document
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r, include = FALSE}
library(xpose)
xpdb <- xpdb_ex_pk
xpdb$options$quiet <- TRUE
xpdb <- as.xpdb(xpdb)
knitr::opts_chunk$set(fig.path = 'man/figures/',
fig.dpi = 96,
fig.align = 'center')
```
# xpose <a href="https://UUPharmacometrics.github.io/xpose/"><img src="man/figures/logo.png" align="right" /></a>
[![R-CMD-check](https://github.com/UUPharmacometrics/xpose/workflows/R-CMD-check/badge.svg)](https://github.com/UUPharmacometrics/xpose/actions)
[![cran_version](https://www.r-pkg.org/badges/version/xpose)](https://CRAN.R-project.org/package=xpose)
[![Codecov test coverage](https://codecov.io/gh/UUPharmacometrics/xpose/branch/master/graph/badge.svg)](https://app.codecov.io/gh/UUPharmacometrics/xpose?branch=master)
[![downloads](https://cranlogs.r-pkg.org/badges/grand-total/xpose)](https://CRAN.R-project.org/package=xpose)
## Overview
[xpose](https://UUPharmacometrics.github.io/xpose/) was designed as a [ggplot2](https://ggplot2.tidyverse.org/)-based alternative to [xpose4](https://uupharmacometrics.github.io/xpose4/). xpose aims to reduce the post processing burden and improve diagnostics commonly associated the development of non-linear mixed effect models.
## Installation
``` r
# Install the lastest release from the CRAN
install.packages('xpose')
# Or install the development version from GitHub
# install.packages('devtools')
devtools::install_github('UUPharmacometrics/xpose')
```
## Getting started
### Load xpose
``` r
library(xpose)
```
### Import run output
``` r
xpdb <- xpose_data(runno = '001')
```
### Glance at the data object
```{r, comment = ''}
xpdb
```
#### Model summary
```{r, comment = ''}
summary(xpdb, problem = 1)
```
### Generate diagnostics
#### Standard goodness-of-fit plots
```{r readme_example_figure_1, fig.width = 5, fig.height = 5.1, out.width = '50%', message=FALSE}
dv_vs_ipred(xpdb)
```
#### Individual plots
```{r readme_example_figure_2, fig.width = 7, out.width = '75%'}
ind_plots(xpdb, page = 1)
```
#### Visual predictive checks
```{r readme_example_figure_3, fig.width = 7, out.width = '75%', warning = FALSE}
xpdb %>%
vpc_data(stratify = 'SEX', opt = vpc_opt(n_bins = 7, lloq = 0.1)) %>%
vpc()
```
#### Distribution plots
```{r readme_example_figure_4, fig.width = 7, out.width = '75%'}
eta_distrib(xpdb, labeller = 'label_value')
```
#### Minimization diagnostics
```{r readme_example_figure_5, fig.width = 7, out.width = '75%'}
prm_vs_iteration(xpdb, labeller = 'label_value')
```
## Recommended reading
The [xpose website](https://UUPharmacometrics.github.io/xpose/) contains several useful articles to make full use of xpose
When working with xpose, a working knowledge of ggplot2 is recommended. Help for ggplot2 can be found in:
- The ggplot2 [documentation](https://ggplot2.tidyverse.org/reference/)
- The ggplot2 [mailing list](https://groups.google.com/forum/?fromgroups#!forum/ggplot2)
- Internet resources (stack overflow, etc.)
## Contribute
Please note that the xpose project is released with a [Contributor Code of Conduct](https://github.com/UUPharmacometrics/xpose/blob/master/.github/CODE_OF_CONDUCT.md) and [Contributing Guidelines](https://github.com/UUPharmacometrics/xpose/blob/master/.github/CONTRIBUTING.md). By contributing to this project, you agree to abide these.