Skip to contents

This is the panel function for Xpose 4. This is not intended to be ised outside the xpose.plot.default function. Most of the arguments take their default values from xpose.data object but this can be overridden by supplying them as argument to xpose.plot.default.

Usage

xpose.panel.default(
  x,
  y,
  object,
  subscripts,
  groups = object@Prefs@Xvardef$id,
  grp.col = NULL,
  iplot = NULL,
  inclZeroWRES = FALSE,
  onlyfirst = FALSE,
  samp = NULL,
  xvarnam = NULL,
  yvarnam = NULL,
  PI = NULL,
  PI.subset = NULL,
  PI.bin.table = NULL,
  PI.real = NULL,
  PI.mirror = NULL,
  PI.ci = NULL,
  PPI = NULL,
  PI.mean = FALSE,
  PI.delta.mean = FALSE,
  PI.x.median = TRUE,
  PI.rug = "Default",
  PI.rug.col = "orange",
  PI.rug.lwd = 3,
  PI.identify.outliers = TRUE,
  PI.outliers.col = "red",
  PI.outliers.pch = 8,
  PI.outliers.cex = 1,
  PI.limits = c(0.025, 0.975),
  PI.arcol = "lightgreen",
  PI.up.lty = 2,
  PI.up.type = "l",
  PI.up.col = "black",
  PI.up.lwd = 2,
  PI.down.lty = 2,
  PI.down.type = "l",
  PI.down.col = "black",
  PI.down.lwd = 2,
  PI.med.lty = 1,
  PI.med.type = "l",
  PI.med.col = "black",
  PI.med.lwd = 2,
  PI.mean.lty = 3,
  PI.mean.type = "l",
  PI.mean.col = "black",
  PI.mean.lwd = 2,
  PI.delta.mean.lty = 3,
  PI.delta.mean.type = "l",
  PI.delta.mean.col = "black",
  PI.delta.mean.lwd = 2,
  PI.real.up.lty = 2,
  PI.real.up.type = "l",
  PI.real.up.col = "red",
  PI.real.up.lwd = 2,
  PI.real.down.lty = 2,
  PI.real.down.type = "l",
  PI.real.down.col = "red",
  PI.real.down.lwd = 2,
  PI.real.med.lty = 1,
  PI.real.med.type = "l",
  PI.real.med.col = "red",
  PI.real.med.lwd = 2,
  PI.real.mean.lty = 3,
  PI.real.mean.type = "l",
  PI.real.mean.col = "red",
  PI.real.mean.lwd = 2,
  PI.real.delta.mean.lty = 3,
  PI.real.delta.mean.type = "l",
  PI.real.delta.mean.col = "red",
  PI.real.delta.mean.lwd = 2,
  PI.mirror.up.lty = 2,
  PI.mirror.up.type = "l",
  PI.mirror.up.col = "darkgreen",
  PI.mirror.up.lwd = 1,
  PI.mirror.down.lty = 2,
  PI.mirror.down.type = "l",
  PI.mirror.down.col = "darkgreen",
  PI.mirror.down.lwd = 1,
  PI.mirror.med.lty = 1,
  PI.mirror.med.type = "l",
  PI.mirror.med.col = "darkgreen",
  PI.mirror.med.lwd = 1,
  PI.mirror.mean.lty = 3,
  PI.mirror.mean.type = "l",
  PI.mirror.mean.col = "darkgreen",
  PI.mirror.mean.lwd = 1,
  PI.mirror.delta.mean.lty = 3,
  PI.mirror.delta.mean.type = "l",
  PI.mirror.delta.mean.col = "darkgreen",
  PI.mirror.delta.mean.lwd = 1,
  PI.ci.up.arcol = "blue",
  PI.ci.up.lty = 3,
  PI.ci.up.type = "l",
  PI.ci.up.col = "darkorange",
  PI.ci.up.lwd = 2,
  PI.ci.down.arcol = "blue",
  PI.ci.down.lty = 3,
  PI.ci.down.type = "l",
  PI.ci.down.col = "darkorange",
  PI.ci.down.lwd = 2,
  PI.ci.med.arcol = "red",
  PI.ci.med.lty = 4,
  PI.ci.med.type = "l",
  PI.ci.med.col = "darkorange",
  PI.ci.med.lwd = 2,
  PI.ci.mean.arcol = "purple",
  PI.ci.mean.lty = 4,
  PI.ci.mean.type = "l",
  PI.ci.mean.col = "darkorange",
  PI.ci.mean.lwd = 2,
  PI.ci.delta.mean.arcol = "purple",
  PI.ci.delta.mean.lty = 4,
  PI.ci.delta.mean.type = "l",
  PI.ci.delta.mean.col = "darkorange",
  PI.ci.delta.mean.lwd = 2,
  PI.ci.area.smooth = FALSE,
  type = object@Prefs@Graph.prefs$type,
  col = object@Prefs@Graph.prefs$col,
  pch = object@Prefs@Graph.prefs$pch,
  cex = object@Prefs@Graph.prefs$cex,
  lty = object@Prefs@Graph.prefs$lty,
  lwd = object@Prefs@Graph.prefs$lwd,
  fill = object@Prefs@Graph.prefs$fill,
  ids = NULL,
  idsmode = object@Prefs@Graph.prefs$idsmode,
  idsext = object@Prefs@Graph.prefs$idsext,
  idscex = object@Prefs@Graph.prefs$idscex,
  idsdir = object@Prefs@Graph.prefs$idsdir,
  abline = object@Prefs@Graph.prefs$abline,
  abllwd = object@Prefs@Graph.prefs$abllwd,
  abllty = object@Prefs@Graph.prefs$abllty,
  ablcol = object@Prefs@Graph.prefs$ablcol,
  smooth = object@Prefs@Graph.prefs$smooth,
  smlwd = object@Prefs@Graph.prefs$smlwd,
  smlty = object@Prefs@Graph.prefs$smlty,
  smcol = object@Prefs@Graph.prefs$smcol,
  smspan = object@Prefs@Graph.prefs$smspan,
  smdegr = object@Prefs@Graph.prefs$smdegr,
  smooth.for.groups = NULL,
  lmline = object@Prefs@Graph.prefs$lmline,
  lmlwd = object@Prefs@Graph.prefs$lmlwd,
  lmlty = object@Prefs@Graph.prefs$lmlty,
  lmcol = object@Prefs@Graph.prefs$lmcol,
  suline = object@Prefs@Graph.prefs$suline,
  sulwd = object@Prefs@Graph.prefs$sulwd,
  sulty = object@Prefs@Graph.prefs$sulty,
  sucol = object@Prefs@Graph.prefs$sucol,
  suspan = object@Prefs@Graph.prefs$suspan,
  sudegr = object@Prefs@Graph.prefs$sudegr,
  grid = object@Prefs@Graph.prefs$grid,
  logy = FALSE,
  logx = FALSE,
  force.x.continuous = FALSE,
  bwhoriz = object@Prefs@Graph.prefs$bwhoriz,
  bwratio = object@Prefs@Graph.prefs$bwratio,
  bwvarwid = object@Prefs@Graph.prefs$bwvarwid,
  bwdotpch = object@Prefs@Graph.prefs$bwdotpch,
  bwdotcol = object@Prefs@Graph.prefs$bwdotcol,
  bwdotcex = object@Prefs@Graph.prefs$bwdotcex,
  bwreccol = object@Prefs@Graph.prefs$bwreccol,
  bwrecfill = object@Prefs@Graph.prefs$bwrecfill,
  bwreclty = object@Prefs@Graph.prefs$bwreclty,
  bwreclwd = object@Prefs@Graph.prefs$bwreclwd,
  bwumbcol = object@Prefs@Graph.prefs$bwumbcol,
  bwumblty = object@Prefs@Graph.prefs$bwumblty,
  bwumblwd = object@Prefs@Graph.prefs$bwumblwd,
  bwoutcol = object@Prefs@Graph.prefs$bwoutcol,
  bwoutcex = object@Prefs@Graph.prefs$bwoutcex,
  bwoutpch = object@Prefs@Graph.prefs$bwoutpch,
  autocorr = FALSE,
  vline = NULL,
  vllwd = 3,
  vllty = 2,
  vlcol = "grey",
  hline = NULL,
  hllwd = 3,
  hllty = 1,
  hlcol = "grey",
  pch.ip.sp = pch,
  cex.ip.sp = cex,
  ...
)

Arguments

x

Name(s) of the x-variable.

y

Name(s) of the y-variable.

object

An xpose.data object.

subscripts

The standard Trellis subscripts argument (see xyplot)

groups

Name of the variable used for superpose plots.

grp.col

Logical value indicating whether or not to use colour highlighting when groups are specified. NULL means no highlighting, while TRUE will identify group members by colour.

iplot

Is this an individual plots matrix? Internal use only.

inclZeroWRES

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

onlyfirst

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

samp

An integer between 1 and object@Nsim (seexpose.data-class) specifying which of the simulated data sets to extract from SData.

xvarnam

Character string with the name of the x-variable.

yvarnam

Character string with the name of the y-variable.

PI

Either "lines", "area" or "both" specifying whether prediction intervals (as lines, as a shaded area or both) should be computed from the data in SData and added to the display. NULL means no prediction interval.

PI.subset

The subset to be used for the PI.

PI.bin.table

The table used to create VPC plots. Has a specific format created by read.npc.vpc.results

PI.real

Plot the percentiles of the real data in the various bins. values can be NULL or TRUE. Note that for a bin with few actual observations the percentiles will be approximate. For example, the 95th percentile of 4 data points will always be the largest of the 4 data points.

PI.mirror

Plot the percentiles of one simulated data set in each bin. values allowed are NULL, TRUE or AN.INTEGER.VALUE. TRUE takes the first mirror from PI.bin.table and AN.INTEGER.VALUE can be 1, 2, ...{} n where n is the number of mirror's output in the PI.bin.table. Used mainly by xpose.VPC.

PI.ci

Plot the prediction interval of the simulated data's percentiles for each bin. Values can be "both", "area" or "lines" This can be thought of as a prediction interval about the PI.real or a confidence interval about the PI. However, note that with increasing number of simulations the CI will not go towards zero because the interval is also dependent on the size of the data set.

PPI

The plot prediction interval. Has a specific format that must be followed. See setup.PPI.

PI.mean

Should the mean be plotted in the VPCs? TRUE or FALSE.

PI.delta.mean

Should the delta mean be plotted in the VPCs? TRUE or FALSE.

PI.x.median

Should the x-location of percentile lines in a bin be marked at the median of the x-values? (TRUE or FALSE)

PI.rug

Should there be markings on the plot showing where the binning intervals for the VPC are (or the locations of the independent variable used for each VPC calculation if binning is not used)?

PI.rug.col

Color of the PI.rug.

PI.rug.lwd

Linw width of the PI.rug.

PI.identify.outliers

Should outlying percentiles of the real data be highlighted? (TRUE of FALSE)

PI.outliers.col

Color of PI.identify.outliers points

PI.outliers.pch

pch of PI.identify.outliers points

PI.outliers.cex

cex of PI.identify.outliers points

PI.limits

A vector of two values that describe the limits of the prediction interval that should be displayed. For example c(0.025, 0.975). These limits should be found in the PI.bin.table table. These limits are also used as the percentages for the PI.real, PI.mirror and PI.ci. However, the confidence interval in PI.ci is always the one defined in the PI.bin.table.

PI.arcol

The color of the PI area

PI.up.lty

The upper line type. can be "dotted" or "dashed", etc.

PI.up.type

The upper type used for plotting. Defaults to a line.

PI.up.col

The upper line color

PI.up.lwd

The upper line width

PI.down.lty

The lower line type. can be "dotted" or "dashed", etc.

PI.down.type

The lower type used for plotting. Defaults to a line.

PI.down.col

The lower line color

PI.down.lwd

The lower line width

PI.med.lty

The median line type. can be "dotted" or "dashed", etc.

PI.med.type

The median type used for plotting. Defaults to a line.

PI.med.col

The median line color

PI.med.lwd

The median line width

PI.mean.lty

The mean line type. can be "dotted" or "dashed", etc.

PI.mean.type

The mean type used for plotting. Defaults to a line.

PI.mean.col

The mean line color

PI.mean.lwd

The mean line width

PI.delta.mean.lty

The delta.mean line type. can be "dotted" or "dashed", etc.

PI.delta.mean.type

The delta.mean type used for plotting. Defaults to a line.

PI.delta.mean.col

The delta.mean line color

PI.delta.mean.lwd

The delta.mean line width

PI.real.up.lty

The upper line type. can be "dotted" or "dashed", etc.

PI.real.up.type

The upper type used for plotting. Defaults to a line.

PI.real.up.col

The upper line color

PI.real.up.lwd

The upper line width

PI.real.down.lty

The lower line type. can be "dotted" or "dashed", etc.

PI.real.down.type

The lower type used for plotting. Defaults to a line.

PI.real.down.col

The lower line color

PI.real.down.lwd

The lower line width

PI.real.med.lty

The median line type. can be "dotted" or "dashed", etc.

PI.real.med.type

The median type used for plotting. Defaults to a line.

PI.real.med.col

The median line color

PI.real.med.lwd

The median line width

PI.real.mean.lty

The mean line type. can be "dotted" or "dashed", etc.

PI.real.mean.type

The mean type used for plotting. Defaults to a line.

PI.real.mean.col

The mean line color

PI.real.mean.lwd

The mean line width

PI.real.delta.mean.lty

The delta.mean line type. can be "dotted" or "dashed", etc.

PI.real.delta.mean.type

The delta.mean type used for plotting. Defaults to a line.

PI.real.delta.mean.col

The delta.mean line color

PI.real.delta.mean.lwd

The delta.mean line width

PI.mirror.up.lty

The upper line type. can be "dotted" or "dashed", etc.

PI.mirror.up.type

The upper type used for plotting. Defaults to a line.

PI.mirror.up.col

The upper line color

PI.mirror.up.lwd

The upper line width

PI.mirror.down.lty

The lower line type. can be "dotted" or "dashed", etc.

PI.mirror.down.type

The lower type used for plotting. Defaults to a line.

PI.mirror.down.col

The lower line color

PI.mirror.down.lwd

The lower line width

PI.mirror.med.lty

The median line type. can be "dotted" or "dashed", etc.

PI.mirror.med.type

The median type used for plotting. Defaults to a line.

PI.mirror.med.col

The median line color

PI.mirror.med.lwd

The median line width

PI.mirror.mean.lty

The mean line type. can be "dotted" or "dashed", etc.

PI.mirror.mean.type

The mean type used for plotting. Defaults to a line.

PI.mirror.mean.col

The mean line color

PI.mirror.mean.lwd

The mean line width

PI.mirror.delta.mean.lty

The delta.mean line type. can be "dotted" or "dashed", etc.

PI.mirror.delta.mean.type

The delta.mean type used for plotting. Defaults to a line.

PI.mirror.delta.mean.col

The delta.mean line color

PI.mirror.delta.mean.lwd

The delta.mean line width

PI.ci.up.arcol

The color of the upper PI.ci.

PI.ci.up.lty

The upper line type. can be "dotted" or "dashed", etc.

PI.ci.up.type

The upper type used for plotting. Defaults to a line.

PI.ci.up.col

The upper line color

PI.ci.up.lwd

The upper line width

PI.ci.down.arcol

The color of the lower PI.ci.

PI.ci.down.lty

The lower line type. can be "dotted" or "dashed", etc.

PI.ci.down.type

The lower type used for plotting. Defaults to a line.

PI.ci.down.col

The lower line color

PI.ci.down.lwd

The lower line width

PI.ci.med.arcol

The color of the median PI.ci.

PI.ci.med.lty

The median line type. can be "dotted" or "dashed", etc.

PI.ci.med.type

The median type used for plotting. Defaults to a line.

PI.ci.med.col

The median line color

PI.ci.med.lwd

The median line width

PI.ci.mean.arcol

The color of the mean PI.ci.

PI.ci.mean.lty

The mean line type. can be "dotted" or "dashed", etc.

PI.ci.mean.type

The mean type used for plotting. Defaults to a line.

PI.ci.mean.col

The mean line color

PI.ci.mean.lwd

The mean line width

PI.ci.delta.mean.arcol

The color of the delta.mean PI.ci.

PI.ci.delta.mean.lty

The delta.mean line type. can be "dotted" or "dashed", etc.

PI.ci.delta.mean.type

The delta.mean type used for plotting. Defaults to a line.

PI.ci.delta.mean.col

The delta.mean line color

PI.ci.delta.mean.lwd

The delta.mean line width

PI.ci.area.smooth

Should the "area" for PI.ci be smoothed to match the "lines" argument? Allowed values are TRUE/FALSE. The "area" is set by default to show the bins used in the PI.ci computation. By smoothing, information is lost and, in general, the confidence intervals will be smaller than they are in reality.

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 over-plotted 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'.

lty

The line type. Line types can either be specified as an integer (0=blank, 1=solid, 2=dashed, 3=dotted, 4=dotdash, 5=longdash, 6=twodash) or as one of the character strings '"blank"', '"solid"', '"dashed"', '"dotted"', '"dotdash"', '"longdash"', or '"twodash"', where '"blank"' uses 'invisible lines' (i.e., doesn't draw them).

lwd

the width for lines. Specified as an integer. The default is 1.

fill

fill for areas in plot

ids

Logical value specifying whether to label data points.

idsmode

Determines the way text labels are added to plots. NULL means that only extreme points are labelled. Non-NULL means all data points are labelled. (See link{xpose.plot.default})

idsext

specifies the extent of the extremes to be used in labelling points. The default is 0.05 (only the most extreme 5% of points are labelled).

idscex

the amount by which labels should be scaled relative to the default. 'NULL' and 'NA' are equivalent to '1.0'.

idsdir

a string indicating the directions of the extremes to include in labelling. Possible values are "up", "down" and "both".

abline

Vector of arguments to the panel.abline function. No abline is drawn if NULL.

abllwd

Line width of any abline.

abllty

Line type of any abline.

ablcol

Line colour of any abline.

smooth

A NULL value indicates that no superposed line should be added to the graph. If TRUE then a smooth of the data will be superimposed.

smlwd

Line width of the x-y smooth.

smlty

Line type of the x-y smooth.

smcol

Line color of the x-y smooth.

smspan

The smoothness parameter for the x-y smooth. The default is 0.667. An argument to panel.loess.

smdegr

The degree of the polynomials to be used for the x-y smooth, up to 2. The default is 1. An argument to panel.loess.

smooth.for.groups

Should a smooth for each group be drawn?

lmline

logical variable specifying whether a linear regression line should be superimposed over an xyplot. NULL ~ FALSE. (y~x)

lmlwd

Line width of the lmline.

lmlty

Line type of the lmline.

lmcol

Line colour of the lmline.

suline

A NULL value indicates that no superposed line should be added to the graph. If non-NULL then this should be the vector (the same length as y) of data points to be used for the smoothed superposed line.

sulwd

Line width of the superposed smooth.

sulty

Line type of the superposed smooth.

sucol

Line color of the superposed smooth.

suspan

The smoothness parameter. The default is 0.667. An argument to panel.loess.

sudegr

The degree of the polynomials to be used, up to 2. The default is 1. An argument to panel.loess.

grid

logical value indicating whether a visual reference grid should be added to the graph. (Could use arguments for line type, color etc).

logy

Logical value indicating whether the y-axis should be logarithmic.

logx

Logical value indicating whether the y-axis should be logarithmic.

force.x.continuous

Logical value indicating whether x-values should be taken as continuous, even if categorical.

bwhoriz

logical value indicating whether box and whiskers should be horizontal or not. The default is FALSE.

bwratio

Ratio of box height to inter-box space. The default is 1.5. An argument for panel.bwplot.

bwvarwid

Logical. If TRUE, widths of boxplots are proportional to the number of points used in creating it. The default is FALSE. An argument for panel.bwplot.

bwdotpch

Graphical parameter controlling the dot plotting character in boxplots. 'bwdotpch="|"' is treated specially, by replacing the dot with a line. The default is 16. An argument for panel.bwplot.

bwdotcol

Graphical parameter controlling the dot colour in boxplots - an integer or string. See 'col'. The default is black. An argument for panel.bwplot.

bwdotcex

The amount by which plotting text and symbols should be scaled relative to the default in boxplots. 'NULL' and 'NA' are equivalent to '1.0'. An argument for panel.bwplot.

bwreccol

The colour to use for the box rectangle in boxplots - an integer or string. The default is blue. See trellis.par.get and "box.rectangle".

bwrecfill

The colour to use for filling the box rectangle in boxplots - an integer or string. The default is transparent (none). See trellis.par.get and "box.rectangle".

bwreclty

The line type for the box rectangle in boxplots - an integer or string. The default is solid. See trellis.par.get and "box.rectangle".

bwreclwd

The width of the lines for the box rectangle in boxplots - an integer. The default is 1. See trellis.par.get and "box.rectangle".

bwumbcol

The colour to use for the umbrellas in boxplots - an integer or string. The default is blue. See trellis.par.get and "box.umbrella".

bwumblty

The line type for the umbrellas in boxplots - an integer or string. The default is solid.See trellis.par.get and "box.umbrella".

bwumblwd

the width of the lines for the umbrellas in boxplots - an integer. The default is 1. See trellis.par.get and "box.umbrella".

bwoutcol

The colour to use for the outliers in boxplots - an integer or string. The default is blue. See trellis.par.get and "box.symbol".

bwoutcex

The amount by which outlier points should be scaled relative to the default in boxplots. 'NULL' and 'NA' are equivalent to '1.0'. The default is 0.8. See trellis.par.get and "box.symbol".

bwoutpch

The plotting character, or symbol, to use for outlier points in boxplots. Specified as an integer. See R help on 'points'. The default is an open circle. See trellis.par.get and "box.symbol".

autocorr

Is this an autocorrelation plot? Values can be TRUE/FALSE.

vline

Add a vertical line to the plot at the values specified.

vllwd

Width (lwd) of vertical line

vllty

Line type (lty) for vertical line

vlcol

Color (col) of vertical line

hline

Add a horizontal line to the plot at the values specified.

hllwd

Width (lwd) of horizontal line

hllty

Line type (lty) for horizontal line

hlcol

Color (col) of horizontal line

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 that may be needed in the function.

See also

xpose.data-class, Cross-references above.

Author

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