Skip to contents

This creates a stack of four plots, comparing absolute values of PRED, absolute values of IPRED, delta CWRES (or WRES) and delta IWRES estimates for the two specified model fits.

Usage

add.model.comp(
  object,
  object.ref = NULL,
  onlyfirst = FALSE,
  inclZeroWRES = FALSE,
  subset = xsubset(object),
  main = "Default",
  force.wres = FALSE,
  ...
)

Arguments

object

An xpose.data object.

object.ref

An xpose.data object. If not supplied, the user will be prompted.

onlyfirst

Logical value indicating whether only the first row per individual is included in the plot.

inclZeroWRES

Logical value indicating whether rows with WRES=0 is included in the plot. The default is TRUE.

subset

A string giving the subset expression to be applied to the data before plotting. See xsubset.

main

The title of the plot. If "Default" then a default title is plotted. Otherwise the value should be a string like "my title" or NULL for no plot title.

force.wres

Should we use the WRES in the plots instead of CWRES (logical TRUE or FALSE)

...

Other arguments passed to link{xpose.plot.default}.

Value

Returns a stack of plots comprising comparisons of absolute values of PRED, absolute values of IPRED, absolute differences in CWRES (or WRES) and absolute differences in IWRES for the two specified runs.

Details

Four model comparison plots are displayed in sequence.

Conditional weighted residuals (CWRES) require some extra steps to calculate. See compute.cwres for details.

A wide array of extra options controlling xyplots are available. See xpose.plot.default for details.

Author

E. Niclas Jonsson, Mats Karlsson, Andrew Hooker & Justin Wilkins

Examples


if (FALSE) {
## We expect to find the required NONMEM run and table files for runs
## 5 and 6 in the current working directory
xpdb5 <- xpose.data(5)
xpdb6 <- xpose.data(6)

## A vanilla plot, without prompts
add.model.comp(xpdb5, xpdb6, prompt = FALSE)

## Custom colours and symbols, no user IDs
add.model.comp(xpdb5, xpdb6, cex=0.6, pch=8, col=1, ids=NULL)
}