xpose.plot.default(x,y,object,
inclZeroWRES = FALSE,
onlyfirst = FALSE,
samp = NULL,
panel = xpose.panel.default,
groups = object@Prefs@Xvardef$id,
ids = object@Prefs@Graph.prefs$ids,
logy = FALSE,
logx = FALSE,
yscale.components= "default",#function(...) yscale.components.default(...),
xscale.components= "default",#function(...) xscale.components.default(...), aspect = object@Prefs@Graph.prefs$aspect,
funx = NULL,
funy = NULL,
iplot = NULL,
## Prediction interval settings
PI = NULL,
## Conditioning settings
by=object@Prefs@Graph.prefs$condvar,
force.by.factor = FALSE,
ordby = object@Prefs@Graph.prefs$ordby,
byordfun = object@Prefs@Graph.prefs$byordfun,
shingnum = object@Prefs@Graph.prefs$shingnum,
shingol = object@Prefs@Graph.prefs$shingol,
by.interval = NULL,
strip = function(...){
strip.default(...,strip.names=c(TRUE,TRUE))
},
use.xpose.factor.strip.names=TRUE,
## Subset stuff
subset = xsubset(object),
autocorr=FALSE,
## Axes and titles
main = xpose.create.title(x,y,object,subset,funx,funy,...),
xlb = xpose.create.label(x,object,funx,logx,autocorr.x=autocorr,...),
ylb = xpose.create.label(y,object,funy,logy,autocorr.y=autocorr,...),
scales = list(),
## Superpose smooth
suline = object@Prefs@Graph.prefs$suline,
## Categorical stuff
bwhoriz = object@Prefs@Graph.prefs$bwhoriz,
## Dilution stuff
dilution = FALSE,
dilfrac = object@Prefs@Graph.prefs$dilfrac,
diltype = object@Prefs@Graph.prefs$diltype,
dilci = object@Prefs@Graph.prefs$dilci,
seed = NULL,
mirror = FALSE,
max.plots.per.page=4,
mirror.aspect="fill",
pass.plot.list=FALSE,
x.cex=NULL,
y.cex=NULL,
main.cex=NULL,
mirror.internal=list(strip.missing=missing(strip)),
...)
xpose.data-class
) specifying which of the
simulated data sets to extract from SData.panel.xyplot
.idlab
xpose data variable).logy
is used. Can be a user difined function or
link{xpose.yscale.components.log10}
. If the axes are not log
transformed then
logx
is used. Can be a user difined function or
link{xpose.xscale.components.log10}
. If the axes are not log
transformed then
xyplot
).SData
and added to the
display. NULL
means no prediction interval.by
is not NULL
,
the variable specified by by
is taken as categorical.by
). The variable
is used in a call to the reorder.factor
function.ordby
)shingnum
)by
.xyplot
. An easy way to change the strip
appearance is to use strip.custom
NULL
if none.NULL
if none.NULL
if none.xsubset
.TRUE/FALSE
.scales
argument in
xyplot
.NULL
if none. This
argument is used if you want to add a superpose line of a variable
not present in the y
list of variables.NULL
means random dilution without stratification. A nonNULL
value
means stratified dilution.NULL
means no
seed.FALSE
, TRUE
or 1
for one mirror
plot, or 3
for three mirror plots.TRUE/FALSE
.create.mirror
. Checks if the
strip
argument from xyplot
has been used.xpose.panel.default
.y
must be numeric (continuous) while x
can be
either numeric of factor. If x
is numeric then a regular
xy-plot is drawn. If x is a factor, on the other hand, a box and
whiskers plot is constructed.
x
and y
can be either single valued strings or vector of
strings. x
and y
can not both be vectors inthe same call
to the function. If ids
is TRUE
, text labels are added to the plotting
symbols. The labels are taken from the idlab
xpose data
variable. The way the text labels are plotted is governed by the
idsmode
argument (passed down to the panel
function). idsmode=NULL
(the default) means that only extreme
data points are labelled while a non-NULL
value adds labels to
all data points (the default in Xpose 3). xpose.panel.default
identifies extreme data points by fitting a loess smooth (y~x
)
and looking at the residuals from that fit. Points that are associated
with the highest/lowest residuals are labelled. "High" and "low" are
judged by the panel function parameter idsext
, which gives the
fraction of the total number of data points that are to be judged
extreme in the "up" and "down" direction. The default value for
idsext
is 0.05 (see xpose.prefs-class
). There is
also a possibility to label only the high or low extreme points. This
is done through the idsdir
argument to
xpose.panel.default
. A value of "both" (the default) means that
both high and low extreme points are labelled while "up" and "down"
labels the high and low extreme points respectively.
Data dilution is useful is situations when there is an excessive
amount of data. xpose.plot.default
can dilute data in two
different ways. The first is a completely random dilution in which all
individuals are elegible of exclusion from the plot. In this case the
argument dilfrac
determines the fraction of individuals that
are excluded from the plot. The second type of dilution uses
stratification to make sure that none of the extreme individuals are
omitted from the plot. Extreme individuals are identified in a similar
manner as extreme data points are identified for text labelling. A
smooth is fitted to the data and the extreme residuals from that fit
is used to inform about extremeness. What is judged as extreme is
determined by the argument dilci
, which defaults to 0.95 (Note
that the meaning of this is the opposite to
idsext
). dilci
give the confidence level of the interval
around the fitted curve outside of which points are deemed to be
extreme. Extreme individuals are those that have at least one point in
the "extremeness" interval. Individuals that do not have any extreme
points are elegible for dilution and dilfrac
give the number of
these that should be omitted from the graph. This means that
dilfrac
should usually be grater for stratified dilution than in
completely random dilution. Any smooths added to a diluted plot is
based on undiluted data.
More graphical parameters may be passed to xpose.panel.default
.
xpose.panel.default
,
xyplot
,
panel.xyplot
,
xpose.prefs-class
,
xpose.data-class
## xpdb5 is an Xpose data object
## We expect to find the required NONMEM run and table files for run
## 5 in the current working directory
xpdb5 <- xpose.data(5)
## A spaghetti plot of DV vs TIME
xpose.plot.default("TIME", "DV", xpdb5)
## A conditioning plot
xpose.plot.default("TIME", "DV", xpdb5, by = "SEX")
## Multiple x-variables
xpose.plot.default(c("WT", "SEX"), "CL", xpdb5)
## Multiple y-variables
xpose.plot.default("WT", c("CL", "V"), xpdb5)
xpose.plot.default("WT", c("CL", "V"), xpdb5, by=c("SEX", "HCTZ"))
## determining the interval for the conditioning variable
wt.ints <- matrix(c(50,60,60,70,70,80,80,90,90,100,100,150),nrow=6,ncol=2,byrow=T)
xpose.plot.default("TIME","DV",xpdb5,by="WT", by.interval=wt.ints)
Run the code above in your browser using DataLab