Learn R Programming

RobAStBase (version 0.7.1)

infoPlot: Plot absolute and relative information

Description

Plot absolute and relative information of influence curves.

Usage

infoPlot(object,  ...)
## S3 method for class 'IC':
infoPlot(object, data = NULL, ...,
             withSweave = getdistrOption("withSweave"),
             col = par("col"), lwd = par("lwd"), lty, 
             colI = grey(0.5), lwdI = 0.7*par("lwd"), ltyI = "dotted",
             main = FALSE, inner = TRUE, sub = FALSE, 
             col.inner = par("col.main"), cex.inner = 0.8, 
             bmar = par("mar")[1], tmar = par("mar")[3],
             legend.location = "bottomright",
             mfColRow = TRUE, to.draw.arg = NULL,
             cex.pts = 1, col.pts = par("col"),
             pch.pts = 1, jitter.fac = 1, with.lab = FALSE,
             lab.pts = NULL, lab.font = NULL,
             which.lbs = NULL, which.Order  = NULL, return.Order = FALSE)

Arguments

object
object of class "InfluenceCurve"
data
optional data argument --- for plotting observations into the plot;
withSweave
logical: if TRUE (for working with Sweave) no extra device is opened
main
logical: is a main title to be used? or just as argument main in plot.default.
inner
logical: do panels have their own titles? or character vector of / cast to length 'number of compared dimensions'; if argument to.draw.arg is used, this refers to a vector of length 1
sub
logical: is a sub-title to be used? or just as argument sub in plot.default.
tmar
top margin -- useful for non-standard main title sizes
bmar
bottom margin -- useful for non-standard sub title sizes
col
color of IC in argument object.
lwd
linewidth of IC in argument object.
lty
line-type of IC in argument object.
colI
color of the classically optimal IC
lwdI
linewidth of the classically optimal IC
ltyI
line-type of the classically optimal IC
cex.inner
magnification to be used for inner titles relative to the current setting of cex; as in par
col.inner
character or integer code; color for the inner title
legend.location
a valid argument x for legend --- the place where to put the legend on the last issued plot --- or a list of length (number of plotted panels)
mfColRow
shall default partition in panels be used --- defaults to TRUE
to.draw.arg
Either NULL (default; everything is plotted) or a vector making a selection among the relative information plots; the absolute information being plotted in any
cex.pts
size of the points of the data argument plotted
col.pts
color of the points of the data argument plotted
pch.pts
symbol of the points of the data argument plotted
with.lab
logical; shall labels be plotted to the observations?
lab.pts
character or NULL; labels to be plotted to the observations; if NULL observation indices;
lab.font
font to be used for labels
jitter.fac
jittering factor used in case of a DiscreteDistribution for plotting points of the data argument in a jittered fashion.
which.lbs
either an integer vector with the indices of the observations to be plotted into graph or NULL --- then no observation is excluded
which.Order
we order the observations (descending) according to the norm given by normtype(object); then which.Order either is an integer vector with the indices of the ordered observations (remai
return.Order
logical; if TRUE, a list of length two with order vectors is returned --- one for ordering w.r.t. the given IC, one for ordering w.r.t. the classically optimal IC; more specifically, the order of the (remaining) observations gi
...
further parameters for plot

concept

  • absolute information
  • relative information

Details

Absolute information is defined as the square of the length of an IC. The relative information is defined as the absolute information of one component with respect to the absolute information of the whole IC; confer Section 8.1 of Kohl (2005). Any parameters of plot.default may be passed on to this particular plot method. For main-, inner, and subtitles given as arguments main, inner, and sub, top and bottom margins are enlarged to 5 resp. 6 by default but may also be specified by tmar / bmar arguments. If main / inner / sub are logical then if the respective argument is FALSE nothing is done/plotted, but if it is TRUE, we use a default main title taking up the calling arguments in case of main, default inner titles taking up the class and (named) parameter slots of arguments in case of inner, and a "generated on "-tag in case of sub. Of course, if main / inner / sub are character, this is used for the title; in case of inner it is then checked whether it has correct length. In all title arguments, the following patterns are substituted: [object Object],[object Object],[object Object] If argument ... contains argument ylim, this may either be as in plot.default (i.e. a vector of length 2) or a vector of length 2*(number of plotted dimensions + e), where e is 1 or 0 depending on whether absolute information is plotted or not; in the case of longer length, if e is 1, the first two elements are the values for ylim in panel "Abs", while the last 2*(number of plotted dimensions) are the values for ylim for the plotted dimensions of the IC, one pair for each dimension.

References

Kohl, M. (2005) Numerical Contributions to the Asymptotic Theory of Robustness. Bayreuth: Dissertation.

See Also

L2ParamFamily-class, IC-class

Examples

Run this code
N <- NormLocationScaleFamily(mean=0, sd=1) 
IC1 <- optIC(model = N, risk = asCov())
infoPlot(IC1)
## selection of subpanels for plotting
par(mfrow=c(1,2))
infoPlot(IC1, mfColRow = FALSE, to.draw.arg=c("Abs","sd"))
infoPlot(IC1, mfColRow = FALSE, to.draw.arg=c("Abs","mean"), 
              panel.first= grid(), ylim = c(0,4), xlim = c(-6,6))
infoPlot(IC1, mfColRow = FALSE, to.draw.arg=c("Abs","mean"), 
              panel.first= grid(), ylim = c(0,4,-3,3), xlim = c(-6,6))
par(mfrow=c(1,3))
infoPlot(IC1, mfColRow = FALSE, panel.first= grid(),
         ylim = c(0,4,0,.3,0,.8), xlim=c(-6,6))
par(mfrow=c(1,1))
data <- r(N)(20)
par(mfrow=c(1,3))
infoPlot(IC1, data=data, mfColRow = FALSE, panel.first= grid(),
         with.lab = TRUE, cex.pts=2,
         which.lbs = c(1:4,15:20), which.Order = 1:6,
         return.Order = TRUE)
infoPlot(IC1, data=data[1:10], mfColRow = FALSE, panel.first= grid(),
         with.lab = TRUE, cex.pts=0.7)
par(mfrow=c(1,1))

Run the code above in your browser using DataLab