nmBoxPlot: NONMEM box plot

Description Usage Arguments Value Author(s) Examples

Description

Creates a boxplot of continuous variables against factor variables

Usage

1
2
3
4
5
6
7
8
nmBoxPlot(obj, contVar, factVar, bVars = NULL, iVar = "ID",
  titles = "", xLabs = NULL, xRotAngle = 0, yLabs = NULL,
  overlaid = FALSE, contVarOnX = FALSE, layout = NULL,
  maxPanels = NULL, maxTLevels = Inf, yAxisScaleRelations = c("same",
  "free", "sliced"), factBin = Inf, problemNum = 1, subProblems = 1,
  hLines = NULL, balancedContAxis = FALSE, medianLines = TRUE,
  modifyOnResidual = TRUE, residVars = c("WRES", "IWRE", "IWRES"),
  xAxisScaleRelations = c("same", "free", "sliced"), ...)

Arguments

obj

An object of class NMRun, NMProblem, or data.frame. The object from which data will be plotted.

contVar

Character vector or comma-seperated list of continuous variables from which boxplots are created

factVar

Factor variable (single string)

bVars

Trellis variables, specified as characters (or NULL, which is the default).

iVar

ubject identifier variable.

titles

Main title.

xLabs

X-axis label.

xRotAngle

Angle by which to rotate the x-axis tick marks

yLabs

Y-axis label.

overlaid

logical flag. Should multiple factor variables be plotted on a single plot, or should multiple subplots with different factors be generated?

contVarOnX

If TRUE, will flip axes so that the continuous variable is on the x-axis.

layout

Numeric vector giving the number of columns, rows and pages in a multipanel display.

maxPanels

Maximum number of panels that should appear on each page of a graph.

maxTLevels

If a single numeric (or string), the maximum number of levels that a "by" variable can have before it is binned. If a character vector or a vector of length greater than one, the explicit breakpoints.

yAxisScaleRelations

Axis scale relations when multiple y-variables exist. One of "same", "free" or "sliced".

factBin

Single numeric. Factor variable will be binned to this many levels if it has more levels than this value. Binning done according to "counts".

problemNum

The problem number, required for a NMRun object.

subProblems

The sub problem of a run with simulations.

hLines

Numeric vector. If not empty (NULL or zero length vector), horizontal lines will be added at y = (all values)

balancedContAxis

Single logical. If TRUE, axis with continuous variable will extend equally in both directions

medianLines

Single logical. If TRUE, will plot median lines inside boxes instead of points (pch = 19)

modifyOnResidual

Single logical. If TRUE, will force balanced continuous variable axis and a horizontal line at y = 0 IF there is only one continuous variable AND it is contained in residVars.

residVars

A vector of character names to count as residual variables (for use with modifyOnResidual)

xAxisScaleRelations

Axis scale relations when multiple x-variables exist. One of "same", "free" or "sliced".

...

Additional parameters to bwplot.

Value

Multitrellis class object containing the plot.

Author(s)

Mango Solutions

Examples

1
2
3
4
5
6
7
## Not run:  
Theoph.df <- as.data.frame(Theoph)
nmBoxPlot(Theoph.df, contVar = "conc", factVar = "Time", factBin = 6)

## End(Not run)
nmBoxPlot(sleep, contVar = "extra" , factVar = "group", titles = "Sleep data",
xLabs = "Group", yLabs = "Extra sleep", medianLines = FALSE)

MangoTheCat/RNMGraphics documentation built on May 8, 2019, 3:51 p.m.