plot_cellMCD | R Documentation |
Function for making plots based on the output of cellMCD
.
plot_cellMCD(cellout, type = "Zres/X", whichvar = NULL,
horizvar = NULL, vertivar = NULL,
hband = NULL, vband = NULL, drawellipse = T,
opacity = 0.5, identify = FALSE,
ids = NULL, labelpoints = T, vlines = FALSE,
clines = TRUE, main = NULL,
xlab = NULL, ylab = NULL, xlim = NULL,
ylim = NULL, cex = 1, cex.main = 1.2,
cex.txt = 0.8, cex.lab = 1, line = 2.0)
cellout |
output of function |
type |
type of diagnostic plot. Should be one of |
whichvar |
number or name of the variable to be plotted. Not applicable when |
horizvar |
number or name of the variable to be plotted on the horizontal axis. Only when |
vertivar |
number or name of the variable to be plotted on the vertical axis. Only when |
hband |
whether to draw a horizontal tolerance band. |
vband |
whether to draw a vertical tolerance band. |
drawellipse |
whether to draw a |
opacity |
opacity of the plotted points: 1 is fully opaque, less is more transparent. |
identify |
if |
ids |
vector of case numbers to be emphasized (colored red) in the plot. If |
labelpoints |
if |
vlines |
for the points in |
clines |
only for type == "bivariate". If TRUE, draws a red connecting line from each point in ids to its imputed point, shown in blue. |
main |
main title of the plot. If |
xlab |
overriding label for x-axis, unless |
ylab |
overriding label for y-axis, unless |
xlim |
overriding limits of horizontal axis. |
ylim |
overriding limits of vertical axis. |
cex |
size of plotted points. |
cex.main |
size of the main title. |
cex.lab |
size of the axis labels. |
cex.txt |
size of the point labels. |
line |
distance of axis labels to their axis. |
NULL
, unless identify = TRUE
. Then a list with components:
ids
the case number(s) that were identified
coords
coordinates of all points in the plot.
J. Raymaekers and P.J. Rousseeuw
J. Raymaekers and P.J. Rousseeuw (2022). The cellwise MCD estimator, Journal of the American Statistical Association, to appear. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1080/01621459.2023.2267777")}(link to open access pdf)
cellMCD
mu <- rep(0, 3)
Sigma <- diag(3) * 0.5 + 0.5
set.seed(123)
X <- MASS::mvrnorm(1000, mu, Sigma)
X[1:5, 1] <- X[1:5, 1] + 5
X[6:10, 2] <- X[6:10, 2] - 10
X[12, 1:2] <- c(-4,8)
cellMCD.out <- cellMCD(X)
plot_cellMCD(cellMCD.out, type="bivariate",
horizvar=1, vertivar=2, ids=c(1:10,12))
# For more examples, we refer to the vignette:
## Not run:
vignette("cellMCD_examples")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.