Learn R Programming

xpose4 (version 4.5.0)

ind.plots: Observations (DV), individual predictions (IPRED) and population predictions (PRED) are plotted against the independent variable for every individual in the dataset, for Xpose 4

Description

This is a compound plot consisting of plots of observations (DV), individual predictions (IPRED) and population predictions (PRED) against the independent variable for every individual in the dataset, a specific function in Xpose 4. It is a wrapper encapsulating arguments to the xpose.plot.default function.

Usage

ind.plots(object,
           y.vals = c(
             xvardef("dv",new.obj),
             xvardef("ipred",new.obj),
             xvardef("pred",new.obj)
             ),
           x.vals = xvardef("idv",new.obj),
           id.vals = xvardef("id",new.obj),
           key.text = y.vals,
           main = "Default",
           key="Default",
           xlb = xlabel(xvardef("idv",object),object),
           ylb = NULL,
           layout = c(4,4),
           inclZeroWRES = FALSE,
           subset = xsubset(object),
           type = "o",
           grid=FALSE,
           col = c(1,2,4),
           lty = c(0,1,3),
           lwd = c(1,1,1),
           pch = c(21,32,32),
           cex = c(0.7,0.7,0.7),
           fill=c("lightgrey",0,0),
           prompt = FALSE,
           mirror=NULL,
           main.cex=0.9,
           max.plots.per.page=1,
           pch.ip.sp=c(21,19,18),
           cex.ip.sp=c(0.7,0.4,0.4),
           ...)

Arguments

object
An xpose.data object.
y.vals
The Y values to use.
x.vals
The X values to use.
id.vals
The ID values to use.
key.text
The text in the legend to use.
key
Create a legend.
grid
Should the plots have a grid in each plot?
fill
Fill the circles in the points?
max.plots.per.page
Maximum number of plots per page.
inclZeroWRES
Logical value indicating whether rows with WRES=0 is included in the plot. The default is TRUE.
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 <
xlb
A string giving the label for the x-axis. NULL if none.
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.
subset
A string giving the subset expression to be applied to the data before plotting. See xsubset.
type
1-character string giving the type of plot desired. The default is "o", for overplotted points and lines. See xpose.plot.default.
col
A list of three elements, giving plotting characters for observations, individual predictions, and population predictions, in that order. The default is black for DV, red for individual predictions, and blue for population predictions.
lty
A list of three elements, giving line types for observations, individual predictions, and population predictions, in that order.
lwd
A list of three elements, giving line widths for observations, individual predictions, and population predictions, in that order.
pch
A list of three elements, giving plotting characters for observations, individual predictions, and population predictions, in that order.
cex
A list of three elements, giving relative point size for observations, individual predictions, and population predictions, in that order. The default is c(0.7,0.7,0.7).
prompt
Specifies whether or not the user should be prompted to press RETURN between plot pages. Default is TRUE.
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.
pch.ip.sp
If there is a panel with just one observation then this specifies the type of points for the DV, IPRED and PRED respectively.
cex.ip.sp
If there is a panel with just one observation then this specifies the size of the points for the DV, IPRED and PRED respectively.
...
Other arguments passed to link{xpose.plot.default}.

Value

  • Returns a stack of plots observations (DV) against individual predictions (IPRED) and population predictions (PRED). A wide array of extra options controlling xyplots are available. See xpose.plot.default and xpose.panel.default for details.

Details

Matrices of individual plots are presented for comparison and closer inspection.

See Also

xpose.plot.default, xpose.panel.default, xyplot, strip.default, 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(xpdb)

## Monochrome, suitable for manuscript or report
ind.plots(xpdb, 
  subset="ID>40 & ID<57", 
  col=c(1,1,1), 
  lty=c(0,2,3), 
  strip=function(..., bg) 
    strip.default(..., bg="grey"))

Run the code above in your browser using DataLab