\HeaderA{scattmatrixMiss}{Scatterplot matrix with information about missing/imputed values}{scattmatrixMiss}
\aliasA{TKRscattmatrixMiss}{scattmatrixMiss}{TKRscattmatrixMiss}
\keyword{hplot}{scattmatrixMiss}
%
\begin{Description}\relax
Scatterplot matrix in which observations with missing/imputed values in certain 
variables are highlighted.
\end{Description}
%
\begin{Usage}
\begin{verbatim}
scattmatrixMiss(x, delimiter = NULL, highlight = NULL, 
    selection = c("any","all"), plotvars = NULL, col = c("skyblue",
    "red","orange"), alpha = NULL, pch = c(1,3), lty = par("lty"),
    diagonal = c("density","none"), interactive = TRUE, ...)

TKRscattmatrixMiss(x, delimiter = NULL, highlight = NULL,
    selection = c("any","all"), plotvars = NULL, col = c("skyblue",
    "red","orange"), alpha = NULL, ..., hscale = NULL,
    vscale = NULL, TKRpar = list())
\end{verbatim}
\end{Usage}
%
\begin{Arguments}
\begin{ldescription}
\item[\code{x}] a matrix or \code{data.frame}.
\item[\code{delimiter}] a character-vector to distinguish between variables
and imputation-indices for imputed variables (therefore, \code{x} needs
to have \code{\LinkA{colnames}{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 \code{col}).
\item[\code{highlight}] a vector giving the variables to be used for 
highlighting.  If \code{NULL} (the default), all variables 
are used for highlighting.
\item[\code{selection}] the selection method for highlighting missing/imputed values in 
multiple highlight variables.  Possible values are \code{"any"} 
(highlighting of missing/imputed values in \emph{any} of the highlight 
variables) and \code{"all"} (highlighting of missing/imputed values in 
\emph{all} of the highlight variables).
\item[\code{plotvars}] a vector giving the variables to be plotted.  If 
\code{NULL} (the default), all variables are plotted.
\item[\code{col}] a vector of length three giving the colors to be used in the plot.  
The second/third color will be used for highlighting missing/imputed values.
\item[\code{alpha}] a numeric value between 0 and 1 giving the level of 
transparency of the colors, or \code{NULL}.  This can be used to
prevent overplotting.
\item[\code{pch}] a vector of length two giving the plot characters.  The second 
plot character will be used for the highlighted observations.
\item[\code{lty}] a vector of length two giving the line types for the density 
plots in the diagonal panels (if \code{diagonal="density"}).  The 
second line type is used for the highlighted observations.  If a 
single value is supplied, it is used for both non-highlighted 
and highlighted observations.
\item[\code{diagonal}] a character string specifying the plot to be drawn in the 
diagonal panels.  Possible values are \code{"density"} (density plots 
for non-highlighted and highlighted observations) and \code{"none"}.
\item[\code{interactive}] a logical indicating whether the variables to be used 
for highlighting can be selected interactively (see `Details').
\item[\code{...}] for \code{scattmatrixMiss}, further arguments and 
graphical parameters to be passed to \code{\LinkA{pairsVIM}{pairsVIM}}.  
\code{par("oma")} will be set appropriately unless supplied (see 
\code{\LinkA{par}{par}}).  For \code{TKRscattmatrixMiss}, further 
arguments to be passed to \code{scattmatrixMiss}.
\item[\code{hscale}] horizontal scale factor for plot to be embedded in a 
\emph{Tcl/Tk} window (see `Details').  The default value 
depends on the number of variables.
\item[\code{vscale}] vertical scale factor for the plot to be embedded in a 
\emph{Tcl/Tk} window (see `Details').  The default value 
depends on the number of variables.
\item[\code{TKRpar}] a list of graphical parameters to be set for the plot 
to be embedded in a \emph{Tcl/Tk} window (see `Details' and 
\code{\LinkA{par}{par}}).
\end{ldescription}
\end{Arguments}
%
\begin{Details}\relax
\code{scattmatrixMiss} uses \code{\LinkA{pairsVIM}{pairsVIM}} with a panel function 
that allows highlighting of missing/imputed values.

If \code{interactive=TRUE}, the variables to be used for highlighting 
can be selected interactively.  Observations with missing/imputed values in any 
or in all of the selected variables are highlighted (as determined by 
\code{selection}).  A variable can be added to the selection by clicking 
in a diagonal panel.  If a variable is already selected, clicking on the 
corresponding diagonal panel removes it from the selection.  Clicking 
anywhere else quits the interactive session.

The graphical parameter \code{oma} will be set unless supplied as an 
argument.

\code{TKRscattmatrixMiss} behaves like \code{scattmatrixMiss}, but uses 
\code{\LinkA{tkrplot}{tkrplot}} to embed the plot in a \emph{Tcl/Tk} 
window.  This is useful if the number of variables is large, because 
scrollbars allow to move from one part of the plot to another.
\end{Details}
%
\begin{Note}\relax
Some of the argument names and positions have changed with version 1.3 
due to a re-implementation and for more consistency with other plot 
functions in \code{VIM}.  For back compatibility, the argument 
\code{colcomb} can still be supplied to \code{...} and is handled 
correctly.  Nevertheless, it is deprecated and no longer documented.  
Use \code{highlight} instead.  The arguments \code{smooth}, 
\code{reg.line} and \code{legend.plot} are no longer used and 
ignored if supplied.
\end{Note}
%
\begin{Author}\relax
Andreas Alfons, Matthias Templ, modifications by Bernd Prantner
\end{Author}
%
\begin{SeeAlso}\relax
\code{\LinkA{pairsVIM}{pairsVIM}}, \code{\LinkA{marginmatrix}{marginmatrix}}
\end{SeeAlso}
%
\begin{Examples}
\begin{ExampleCode}
data(sleep, package = "VIM")
## for missing values
x <- sleep[, 1:5]
x[,c(1,2,4)] <- log10(x[,c(1,2,4)])
scattmatrixMiss(x, highlight = "Dream")

## for imputed values
x_imp <- kNN(sleep[, 1:5])
x_imp[,c(1,2,4)] <- log10(x_imp[,c(1,2,4)])
scattmatrixMiss(x_imp, delimiter = "_imp", highlight = "Dream")
\end{ExampleCode}
\end{Examples}
