Learn R Programming

xpose4 (version 4.5.0)

ind.plots.wres.hist: Histograms of weighted residuals for each individual in an Xpose data object, for Xpose 4

Description

This is a compound plot consisting of histograms of the distribution of weighted residuals (any weighted residual available from NONMEM) for every individual in the dataset. It is a wrapper encapsulating arguments to the xpose.plot.histogram function.

Usage

ind.plots.wres.hist(object,
           main = "Default",
           wres="wres",
           ylb = NULL,
           layout=c(4,4),
           inclZeroWRES=FALSE,
           subset=xsubset(object),
           scales=list(cex=0.7,tck=0.5),
           aspect="fill",
           force.by.factor=TRUE,
           ids=F,
           as.table=TRUE,
           hicol = object@Prefs@Graph.prefs$hicol,
           hilty = object@Prefs@Graph.prefs$hilty,
           hilwd = object@Prefs@Graph.prefs$hilwd,
           hidcol = object@Prefs@Graph.prefs$hidcol,
           hidlty = object@Prefs@Graph.prefs$hidlty,
           hidlwd = object@Prefs@Graph.prefs$hidlwd,
           hiborder = object@Prefs@Graph.prefs$hiborder,
           prompt = FALSE,
           mirror=NULL,
           main.cex=0.9,
           max.plots.per.page=1,
           ...)

ind.plots.cwres.hist(object, wres="cwres", ...)

Arguments

object
An xpose.data object.
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. For "Default" the function <
wres
Which weighted residual should we plot? Defaults to the WRES.
ylb
A string giving the label for the y-axis. NULL if none.
layout
A list giving the layout of the graphs on the plot, in columns and rows. The default is 4x4.
inclZeroWRES
Logical value indicating whether rows with WRES=0 is included in the plot. The default is FALSE.
subset
A string giving the subset expression to be applied to the data before plotting. See xsubset.
force.by.factor
hiborder
the border colour of the histogram - an integer or string. The default is black (see histogram).
hicol
the fill colour of the histogram - an integer or string. The default is blue (see histogram).
hilty
the border line type of the histogram - an integer. The default is 1 (see histogram).
hilwd
the border line width of the histogram - an integer. The default is 1 (see histogram).
hidcol
the fill colour of the density line - an integer or string. The default is black (see histogram).
hidlty
the border line type of the density line - an integer. The default is 1 (see histogram).
hidlwd
the border line width of the density line - an integer. The default is 1 (see histogram).
prompt
Specifies whether or not the user should be prompted to press RETURN between plot pages. Default is FALSE.
mirror
Mirror plots are not yet implemented in this function and this argument must contain a value of NULL
main.cex
The size of the title.
max.plots.per.page
Maximum number of plots per page
...
Other arguments passed to xpose.plot.histogram.

Value

  • Returns a compound plot comprising histograms of weighted residual conditioned on individual.

Details

Matrices of histograms of weighted residuals in each included individual are displayed. ind.plots.cwres.hist is just a wrapper for ind.plots.wres.hist(object,wres="cwres").

See Also

xpose.plot.histogram, xpose.panel.histogram, histogram, xpose.prefs-class, xpose.data-class

Examples

Run this code
## We expect to find the required NONMEM run and table files for run
## 5 in the current working directory
xpdb5 <- xpose.data(5)


## Here we load the example xpose database 
data(simpraz.xpdb)
xpdb <- simpraz.xpdb

## A vanilla plot
ind.plots.wres.hist(xpdb)

## Different plotting character 
ind.plots.wres.hist(xpdb, pch=3)

## Different plotting character 
ind.plots.wres.hist(xpdb, pch=3)

##with a grid
ind.plots.wres.hist(xpdb, grid=TRUE)

## subsets
ind.plots.wres.hist(xpdb, subset="ID<10")
ind.plots.wres.hist(xpdb, subset="ID<10 | ID>45",grid=TRUE)

## plot the CWRES instead
ind.plots.wres.hist(xpdb, wres="CWRES")
ind.plots.cwres.hist(xpdb)
ind.plots.cwres.hist(xpdb, subset="ID<10 | ID>45",grid=TRUE)

Run the code above in your browser using DataLab