Type: | Package |
Title: | Graphical Diagnostics for Pharmacometric Models: Extension to 'nlmixr2' |
Version: | 0.4.1 |
Maintainer: | Justin Wilkins <justin.wilkins@occams.com> |
Description: | Extension to 'xpose' to support 'nlmixr2'. Provides functions to import 'nlmixr2' fit data into an 'xpose' data object, allowing the use of 'xpose' for 'nlmixr2' model diagnostics. |
License: | GPL-2 | GPL-3 [expanded from: GPL (≥ 2)] |
Encoding: | UTF-8 |
Depends: | R (≥ 3.2), xpose (≥ 0.4.2) |
Imports: | ggplot2 (≥ 2.2.1), dplyr (≥ 0.7.4), tibble (≥ 2.0.0), stringr (≥ 1.2.0), tidyr (≥ 0.7.2), magrittr (≥ 1.5), methods (≥ 3.4.1), vpc (≥ 1.0.2), crayon, rlang, nlmixr2est |
Suggests: | readr, nlmixr2 |
RoxygenNote: | 7.3.2 |
NeedsCompilation: | no |
Packaged: | 2025-06-27 14:15:40 UTC; justin |
Author: | Justin Wilkins [aut, cre, cph], Matthew Fidler [aut, cph], Benjamin Guiastrennec [aut], Andrew C. Hooker [aut], Anna Olofsson [aut, cph], Sebastian Ueckert [aut], Ron Keizer [aut], Kajsa Harling [ctb], Mike K. Smith [ctb], Elodie Plan [ctb], Mats O. Karlsson [aut, cph], Pharmetheus [ctb], Pfizer [ctb], Occams [ctb], Novartis [ctb] |
Repository: | CRAN |
Date/Publication: | 2025-06-27 14:50:02 UTC |
Default VPC theme for 'xpose.nlmixr2'
Description
Default VPC theme for 'xpose.nlmixr2'.
Usage
nlmixr2_vpc_theme
Format
An object of class vpc_theme
of length 23.
Value
A list with 'vpc' theme specifiers.
Data summary function
Description
Convert 'nlmixr2' model output into an 'xpose' database
Usage
summarise_nlmixr2_model(obj, model, software, rounding, runname)
Arguments
obj |
nlmixr2 fit object to be evaluated |
model |
Model. Can be blank |
software |
Software that generated the model fit |
rounding |
Number of figures to round estimates to |
runname |
Name of the model object being converted |
Value
A summary data object used by xpose_data_nlmixr2.
Default 'nlmixr2' theme for 'xpose'
Description
Default 'nlmixr2' theme for 'xpose'.
Usage
theme_xp_nlmixr2()
Value
A list with 'xpose' theme specifiers.
Import nlmixr2 output into xpose object
Description
Convert 'nlmixr2' model output into an 'xpose' database.
Usage
xpose_data_nlmixr2(
obj = NULL,
pred = NULL,
wres = NULL,
gg_theme = theme_readable(),
xp_theme = theme_xp_default(),
quiet,
skip = NULL,
...
)
xpose_data_nlmixr(
obj = NULL,
pred = NULL,
wres = NULL,
gg_theme = theme_readable(),
xp_theme = theme_xp_default(),
quiet,
skip = NULL,
...
)
Arguments
obj |
nlmixr2 fit object to be evaluated. |
pred |
Name of the population prediction variable to use for plotting. If unspecified, it will choose either "NPDE", "CWRES", and "RES" (in that order) if the column exists in the data. |
wres |
Name of the weighted residual variable to use for plotting. If unspecified, it will choose either "NPDE", "CWRES", and "RES" (in that order) if the column exists in the data. |
gg_theme |
A ggplot2 theme object. |
xp_theme |
An xpose theme or vector of modifications to the
xpose theme (eg. |
quiet |
Logical, if |
skip |
Character vector be used to skip the import/generation of: 'data', 'files', 'summary' or any combination of the three. |
... |
Additional arguments to be passed to the
|
Value
An xpose_data
object suitable for use in 'xpose'.
Examples
## Not run:
library(nlmixr2)
one.cmt <- function() {
ini({
## You may label each parameter with a comment
tka <- 0.45 # Ka
tcl <- log(c(0, 2.7, 100)) # Log Cl
## This works with interactive models
## You may also label the preceding line with label("label text")
tv <- 3.45; label("log V")
## the label("Label name") works with all models
eta.ka ~ 0.6
eta.cl ~ 0.3
eta.v ~ 0.1
add.sd <- 0.7
})
model({
ka <- exp(tka + eta.ka)
cl <- exp(tcl + eta.cl)
v <- exp(tv + eta.v)
linCmt() ~ add(add.sd)
})
}
theo_sd_fit <- nlmixr2(one.cmt, theo_sd, "focei", control=foceiControl(print=0))
xpdb <- xpose_data_nlmixr2(obj = theo_sd_fit)
## End(Not run)