cellwiseheatmap {crmReg} | R Documentation |
Heatmap of cellwise outliers
Description
Makes a heatmap of cellwise outliers.
Usage
cellwiseheatmap(cellwiseoutliers, data,
col = c("blue", "lightgray", "red"), col.scale.factor = 1,
notecol.outlier = "white", notecol.clean = "black", notecex = 1,
margins = c(9.5, 14), lhei = c(0.5, 15), lwid = c(0.1, 3.5),
sepcolor = "white", sepwidth = c(0.01, 0.01))
Arguments
cellwiseoutliers |
a matrix that indicates the cellwise outliers as the (scaled) difference between the original data and imputed data, both scaled and centered. Typically the result of a call to the |
data |
the data as a data frame that is shown in the cells, including row and column names. |
col |
vector of colors used for downward outliers, clean cells and upward outliers respectively (default is |
col.scale.factor |
numeric factor for scaling the colors of the cells (default is |
notecol.outlier |
character string specifying the color for cellnote text of cellwise outliers (default is |
notecol.clean |
character string specifying the color for cellnote text of clean cells (default is |
notecex |
numeric scaling factor for cellnotes (default is |
margins |
numeric vector of length 2 containing the margins (see |
lhei |
numeric vector of length 2 containing the row height (default is |
lwid |
numeric vector of length 2 containing the row width (default is |
sepcolor |
character string specifying the color between the cells (default is |
sepwidth |
vector of length 2 giving the width and height of the separator box drawn between the cells (default is |
Details
cellwiseheatmap
plots a heatmap of cellwise outliers which are typically
the result of a call to the crm
function.
Author(s)
Peter Filzmoser, Sebastiaan Hoppner, Irene Ortner, Sven Serneels, and Tim Verdonck
References
Filzmoser, P., Hoppner, S., Ortner, I., Serneels, S., and Verdonck, T. (2020). Cellwise Robust M regression. Computational Statistics and Data Analysis, 147, 106944. DOI:10.1016/j.csda.2020.106944
See Also
crm
, spadimo
, predict.crm
, daprpr
Examples
library(crmReg)
data(topgear)
# fit Cellwise Robust M-regression:
crmfit <- crm(formula = MPG ~ ., data = topgear)
# cellwise heatmap of casewise outliers:
cellwiseheatmap(cellwiseoutliers = crmfit$cellwiseoutliers[which(crmfit$casewiseoutliers), ],
data = round(topgear[which(crmfit$casewiseoutliers), -7], 2),
col.scale.factor = 1/4)
# check the plotted heatmap!