## S4 method for signature 'OutlierIndex,missing'plot( x,..., type = c("dotchart","distance"), robust =TRUE, symbols = c(16,1,3), xlim =NULL, ylim =NULL, xlab =NULL, ylab =NULL, main =NULL, sub =NULL, ann = graphics::par("ann"), axes =TRUE, frame.plot = axes, panel.first =NULL, panel.last =NULL, legend = list(x ="topleft"))
Arguments
x: An OutlierIndex object.
...: Further parameters to be passed to graphics::points().
type: A character string specifying the type of plot that should be made. It must be one of "dotchart" or "distance". Any unambiguous substring can be given.
robust: A logical scalar: should robust Mahalanobis distances be displayed? Only used if type is "dotchart".
symbols: A lenth-three vector of symbol specification for non-outliers and outliers (resp.).
xlim: A length-two numeric vector giving the x limits of the plot. The default value, NULL, indicates that the range of the finite values to be plotted should be used.
ylim: A length-two numeric vector giving the y limits of the plot. The default value, NULL, indicates that the range of the finite values to be plotted should be used.
xlab, ylab: A character vector giving the x and y axis labels.
main: A character string giving a main title for the plot.
sub: A character string giving a subtitle for the plot.
ann: A logical scalar: should the default annotation (title and x and y axis labels) appear on the plot?
axes: A logical scalar: should axes be drawn on the plot?
frame.plot: A logical scalar: should a box be drawn around the plot?
panel.first: An an expression to be evaluated after the plot axes are set up but before any plotting takes place. This can be useful for drawing background grids.
panel.last: An expression to be evaluated after plotting has taken place but before the axes, title and box are added.
legend: A list of additional arguments to be passed to graphics::legend(); names of the list are used as argument names. If NULL, no legend is displayed.
Returns
plot() is called for its side-effects: is results in a graphic being displayed (invisibly return x).
Examples
## Data from Day et al. 2011data("kommos", package ="folio")# Coerce to compositional datakommos <- remove_NA(kommos, margin =1)# Remove cases with missing valuescoda <- as_composition(kommos, parts =3:17, groups =1)## Detect outliersout <- detect_outlier(coda)plot(out, type ="dotchart")plot(out, type ="distance")## Detect outliers according to CJref <- group_subset(coda, which ="CJ")out <- detect_outlier(coda, reference = ref, method ="mcd")plot(out, type ="dotchart")
References
Filzmoser, P., Garrett, R. G. & Reimann, C. (2005). Multivariate outlier detection in exploration geochemistry. Computers & Geosciences, 31(5), 579-587. tools:::Rd_expr_doi("10.1016/j.cageo.2004.11.013") .
Filzmoser, P. & Hron, K. (2008). Outlier Detection for Compositional Data Using Robust Methods. Mathematical Geosciences, 40(3), 233-248. tools:::Rd_expr_doi("10.1007/s11004-007-9141-5") .
Filzmoser, P., Hron, K. & Reimann, C. (2012). Interpretation of multivariate outliers for compositional data. Computers & Geosciences, 39, 77-85. tools:::Rd_expr_doi("10.1016/j.cageo.2011.06.014") .