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
.
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,
...
)
Name(s) of the x-variable.
Name(s) of the y-variable.
An xpose.data object.
The standard Trellis subscripts argument (see
xyplot
)
Name of the variable used for superpose plots.
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.
Is this an individual plots matrix? Internal use only.
Logical value indicating whether rows with WRES=0 is included in the plot.
Logical value indicating whether only the first row per individual is included in the plot.
An integer between 1 and object@Nsim
(seexpose.data-class
) specifying which of the simulated data
sets to extract from SData.
Character string with the name of the x-variable.
Character string with the name of the y-variable.
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.
The subset to be used for the PI.
The table used to create VPC plots. Has a specific
format created by read.npc.vpc.results
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.
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
.
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.
The plot prediction interval. Has a specific format that must be
followed. See setup.PPI
.
Should the mean be plotted in the VPCs? TRUE or FALSE.
Should the delta mean be plotted in the VPCs? TRUE or FALSE.
Should the x-location of percentile lines in a bin be
marked at the median of the x-values? (TRUE
or FALSE
)
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)?
Color of the PI.rug.
Linw width of the PI.rug.
Should outlying percentiles of the real data be highlighted? (TRUE of FALSE)
Color of PI.identify.outliers points
pch of PI.identify.outliers points
cex of PI.identify.outliers points
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
.
The color of the PI
area
The upper line type. can be "dotted" or "dashed", etc.
The upper type used for plotting. Defaults to a line.
The upper line color
The upper line width
The lower line type. can be "dotted" or "dashed", etc.
The lower type used for plotting. Defaults to a line.
The lower line color
The lower line width
The median line type. can be "dotted" or "dashed", etc.
The median type used for plotting. Defaults to a line.
The median line color
The median line width
The mean line type. can be "dotted" or "dashed", etc.
The mean type used for plotting. Defaults to a line.
The mean line color
The mean line width
The delta.mean line type. can be "dotted" or "dashed", etc.
The delta.mean type used for plotting. Defaults to a line.
The delta.mean line color
The delta.mean line width
The upper line type. can be "dotted" or "dashed", etc.
The upper type used for plotting. Defaults to a line.
The upper line color
The upper line width
The lower line type. can be "dotted" or "dashed", etc.
The lower type used for plotting. Defaults to a line.
The lower line color
The lower line width
The median line type. can be "dotted" or "dashed", etc.
The median type used for plotting. Defaults to a line.
The median line color
The median line width
The mean line type. can be "dotted" or "dashed", etc.
The mean type used for plotting. Defaults to a line.
The mean line color
The mean line width
The delta.mean line type. can be "dotted" or "dashed", etc.
The delta.mean type used for plotting. Defaults to a line.
The delta.mean line color
The delta.mean line width
The upper line type. can be "dotted" or "dashed", etc.
The upper type used for plotting. Defaults to a line.
The upper line color
The upper line width
The lower line type. can be "dotted" or "dashed", etc.
The lower type used for plotting. Defaults to a line.
The lower line color
The lower line width
The median line type. can be "dotted" or "dashed", etc.
The median type used for plotting. Defaults to a line.
The median line color
The median line width
The mean line type. can be "dotted" or "dashed", etc.
The mean type used for plotting. Defaults to a line.
The mean line color
The mean line width
The delta.mean line type. can be "dotted" or "dashed", etc.
The delta.mean type used for plotting. Defaults to a line.
The delta.mean line color
The delta.mean line width
The color of the upper PI.ci
.
The upper line type. can be "dotted" or "dashed", etc.
The upper type used for plotting. Defaults to a line.
The upper line color
The upper line width
The color of the lower PI.ci
.
The lower line type. can be "dotted" or "dashed", etc.
The lower type used for plotting. Defaults to a line.
The lower line color
The lower line width
The color of the median PI.ci
.
The median line type. can be "dotted" or "dashed", etc.
The median type used for plotting. Defaults to a line.
The median line color
The median line width
The color of the mean PI.ci
.
The mean line type. can be "dotted" or "dashed", etc.
The mean type used for plotting. Defaults to a line.
The mean line color
The mean line width
The color of the delta.mean PI.ci
.
The delta.mean line type. can be "dotted" or "dashed", etc.
The delta.mean type used for plotting. Defaults to a line.
The delta.mean line color
The delta.mean line width
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.
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.
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).
The plotting character, or symbol, to use. Specified as an
integer. See R help on points
. The default is an open circle.
The amount by which plotting text and symbols should be scaled relative to the default. 'NULL' and 'NA' are equivalent to '1.0'.
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).
the width for lines. Specified as an integer. The default is 1.
fill for areas in plot
Logical value specifying whether to label data points.
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}
)
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).
the amount by which labels should be scaled relative to the default. 'NULL' and 'NA' are equivalent to '1.0'.
a string indicating the directions of the extremes to include in labelling. Possible values are "up", "down" and "both".
Vector of arguments to the panel.abline
function. No abline is drawn if NULL
.
Line width of any abline.
Line type of any abline.
Line colour of any abline.
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.
Line width of the x-y smooth.
Line type of the x-y smooth.
Line color of the x-y smooth.
The smoothness parameter for the x-y smooth. The default is
0.667. An argument to panel.loess
.
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
.
Should a smooth for each group be drawn?
logical variable specifying whether a linear regression line
should be superimposed over an xyplot
. NULL
~
FALSE. (y~x
)
Line width of the lmline.
Line type of the lmline.
Line colour of the lmline.
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.
Line width of the superposed smooth.
Line type of the superposed smooth.
Line color of the superposed smooth.
The smoothness parameter. The default is 0.667. An argument to
panel.loess
.
The degree of the polynomials to be used, up to 2. The default
is 1. An argument to panel.loess
.
logical value indicating whether a visual reference grid should be added to the graph. (Could use arguments for line type, color etc).
Logical value indicating whether the y-axis should be logarithmic.
Logical value indicating whether the y-axis should be logarithmic.
Logical value indicating whether x-values should be taken as continuous, even if categorical.
logical value indicating whether box and whiskers should be horizontal or not. The default is FALSE.
Ratio of box height to inter-box space. The default is 1.5.
An argument for panel.bwplot
.
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
.
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
.
Graphical parameter controlling the dot colour in boxplots -
an integer or string. See 'col'. The default is black. An argument for
panel.bwplot
.
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
.
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".
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".
The line type for the box rectangle in boxplots - an integer
or string. The default is solid. See trellis.par.get
and "box.rectangle".
The width of the lines for the box rectangle in boxplots -
an integer. The default is 1. See trellis.par.get
and
"box.rectangle".
The colour to use for the umbrellas in boxplots - an integer
or string. The default is blue. See trellis.par.get
and "box.umbrella".
The line type for the umbrellas in boxplots - an integer or
string. The default is solid.See trellis.par.get
and
"box.umbrella".
the width of the lines for the umbrellas in boxplots - an
integer. The default is 1. See trellis.par.get
and
"box.umbrella".
The colour to use for the outliers in boxplots - an integer
or string. The default is blue. See trellis.par.get
and "box.symbol".
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".
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".
Is this an autocorrelation plot? Values can be
TRUE/FALSE
.
Add a vertical line to the plot at the values specified.
Width (lwd) of vertical line
Line type (lty) for vertical line
Color (col) of vertical line
Add a horizontal line to the plot at the values specified.
Width (lwd) of horizontal line
Line type (lty) for horizontal line
Color (col) of horizontal line
If there is a panel with just one observation then this specifies the type of points for the DV, IPRED and PRED respectively.
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.
E. Niclas Jonsson, Mats Karlsson, Justin Wilkins and Andrew Hooker
xpose.data-class
, Cross-references above.