TKRaggr(x, ..., delimiter = NULL, hscale = NULL, vscale = NULL, TKRpar = list())data.frame.x needs to have
colnames). If given, it is used to determine the corresponding
imputation-index for any imputed variable (a logical-vector indicating which
values of the variable have been imputed). If such imputation-indices are
found, they are used for highlighting and the colors are adjusted according
to the given colors for imputed variables (see col).par).aggr, a list of class "aggr" containing the
following components:
data.frame containing the amount of
missing/imputed values in each variable.
If combined is FALSE, two separate plots are drawn for the
missing/imputed values in each variable and the combinations of
missing/imputed and non-missing values. The barplot on the left hand side
shows the amount of missing/imputed values in each variable. In the
aggregation plot on the right hand side, all existing combinations of
missing/imputed and non-missing values in the observations are visualized.
Available, missing and imputed data are color coded as given by col.
Additionally, there are two possibilities to represent the frequencies of
occurrence of the different combinations. The first option is to visualize
the proportions or frequencies by a small bar plot and/or numbers. The
second option is to let the cell heights be given by the frequencies of the
corresponding combinations. Furthermore, variables may be sorted by the
number of missing/imputed values and combinations by the frequency of
occurrence to give more power to finding the structure of missing/imputed
values.
If combined is TRUE, a small version of the barplot showing
the amount of missing/imputed values in each variable is drawn on top of the
aggregation plot.
The graphical parameter oma will be set unless supplied as an
argument.
TKRaggr behaves like plot.aggr, but uses
tkrplot to embed the plot in a Tcl/Tk window.
This is useful if the number of variables and/or combinations is large,
because scrollbars allow to move from one part of the plot to another.
A. Kowarik, M. Templ (2016) Imputation with R package VIM. Journal of Statistical Software, 74(7), 1-16
print.aggr, summary.aggr
data(sleep, package="VIM")
## for missing values
a <- aggr(sleep)
a
summary(a)
## for imputed values
sleep_IMPUTED <- kNN(sleep)
a <- aggr(sleep_IMPUTED, delimiter="_imp")
a
summary(a)
Run the code above in your browser using DataLab