| plot.nlmixr2FitData | R Documentation |
Plot some standard goodness of fit plots for the focei fitted object. When
the model has between-subject variability (BSV), the returned collection also
includes a nested "bsv" element (inside each data/compartment group) with
QQ plots for each BSV parameter, BSV-BSV correlation plots (when more than one
BSV parameter is present) and, when covariate is supplied, BSV-by-covariate
plots.
## S3 method for class 'nlmixr2FitData'
plot(x, covariate = NULL, ...)
x |
a focei fit object |
covariate |
Optional character vector of covariate column names (from the
model input data) to plot against each between-subject variability (BSV)
parameter. Default |
... |
additional arguments (currently ignored) |
A named, nested ggtibble::gglist object (a list of ggplot2 objects
with easier plotting of all of them at the same time)
Wenping Wang & Matthew Fidler
library(nlmixr2est)
one.compartment <- function() {
ini({
tka <- 0.45
tcl <- 1
tv <- 3.45
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)
d/dt(depot) = -ka * depot
d/dt(center) = ka * depot - cl / v * center
cp = center / v
cp ~ add(add.sd)
})
}
## The fit is performed by the function nlmixr/nlmix2 specifying the model, data and estimate
fit <- nlmixr2(one.compartment, theo_sd, est="saem", saemControl(print=0, nBurn = 10, nEm = 20))
# This shows many goodness of fit plots
plot(fit)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.