Learn R Programming

xpose4 (version 4.5.3)

ind.plots.wres.qq: Quantile-quantile plots of weighted residuals for each individual in an Xpose data object, for Xpose 4

Description

This is a compound plot consisting of QQ plots of the distribution of weighted residuals (any weighted residual produced by NONMEM) for every individual in the dataset. The function is a wrapper encapsulating arguments to the xpose.plot.qq function.

Usage

ind.plots.wres.qq(object,
           main = "Default",
           wres="wres",
           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,
           type="o",
           pch=object@Prefs@Graph.prefs$pch,
           col=object@Prefs@Graph.prefs$col,
           cex=object@Prefs@Graph.prefs$cex,
           abllty = object@Prefs@Graph.prefs$abllty,
           abllwd = object@Prefs@Graph.prefs$abllwd,
           ablcol = object@Prefs@Graph.prefs$ablcol,
           prompt = FALSE,
           main.cex=0.9,
           mirror=NULL,
           max.plots.per.page=1,
           ...)

ind.plots.cwres.qq(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 xpose.multiple.plot.title is used.

wres

Which weighted residual should we plot? Defaults to the WRES.

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.

scales
aspect
force.by.factor
as.table
type

1-character string giving the type of plot desired. The following values are possible, for details, see 'plot': '"p"' for points, '"l"' for lines, '"o"' for overplotted points and lines, '"b"', '"c"') for (empty if '"c"') points joined by lines, '"s"' and '"S"' for stair steps and '"h"' for histogram-like vertical lines. Finally, '"n"' does not produce any points or lines.

col

The color for lines and points. Specified as an integer or a text string. A full list is obtained by the R command colours(). The default is blue (col=4).

pch

The plotting character, or symbol, to use. Specified as an integer. See R help on points. The default is an open circle.

cex

The amount by which plotting text and symbols should be scaled relative to the default. 'NULL' and 'NA' are equivalent to '1.0'.

abllwd

Line width of the line of identity.

abllty

Line type of the line of identity.

ablcol

Line colour of the line of identity.

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 link{xpose.plot.qq}.

Value

Returns a compound plot comprising QQ plots of weighted residuals conditioned on individual.

Details

Matrices of QQ plots of weighted residuals in each included individual are displayed.

A wide array of extra options controlling QQ plots are available. See xpose.plot.qq for details.

See Also

xpose.plot.qq, xpose.panel.qq, qqplot, qqmath, 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.qq(xpdb)

## Custom colours 
ind.plots.wres.qq(xpdb, hicol=5, hidcol=2)

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

## Subset on ID value
ind.plots.wres.qq(xpdb,grid=TRUE,subset="ID<10")

## Use CWRES instead
ind.plots.wres.qq(xpdb,grid=TRUE,subset="ID<10",wres="cwres")
ind.plots.cwres.qq(xpdb,grid=TRUE,subset="ID<10")

## Use NPDEs instead
ind.plots.wres.qq(xpdb,grid=TRUE,subset="ID<10",wres="NPDE")

Run the code above in your browser using DataLab