File: scattmatrixMiss.Rd

package info (click to toggle)
r-cran-vim 6.2.2%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 1,556 kB
  • sloc: cpp: 141; sh: 12; makefile: 2
file content (148 lines) | stat: -rw-r--r-- 5,828 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/scattmatrixMiss.R
\name{scattmatrixMiss}
\alias{scattmatrixMiss}
\title{Scatterplot matrix with information about missing/imputed values}
\usage{
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,
  ...
)
}
\arguments{
\item{x}{a matrix or \code{data.frame}.}

\item{delimiter}{a character-vector to distinguish between variables and
imputation-indices for imputed variables (therefore, \code{x} needs to have
\code{\link[=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{highlight}{a vector giving the variables to be used for highlighting.
If \code{NULL} (the default), all variables are used for highlighting.}

\item{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{plotvars}{a vector giving the variables to be plotted.  If \code{NULL}
(the default), all variables are plotted.}

\item{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{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{pch}{a vector of length two giving the plot characters.  The second
plot character will be used for the highlighted observations.}

\item{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{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{interactive}{a logical indicating whether the variables to be used for
highlighting can be selected interactively (see \sQuote{Details}).}

\item{\dots}{for \code{scattmatrixMiss}, further arguments and graphical
parameters to be passed to \code{\link[=pairsVIM]{pairsVIM()}}.  \code{par("oma")} will
be set appropriately unless supplied (see \code{\link[graphics:par]{graphics::par()}}).  For
\code{TKRscattmatrixMiss}, further arguments to be passed to
\code{scattmatrixMiss}.}
}
\description{
Scatterplot matrix in which observations with missing/imputed values in
certain variables are highlighted.
}
\details{
\code{scattmatrixMiss} uses \code{\link[=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
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.
}
\note{
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{\dots{}} 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.
}
\examples{

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")

}
\references{
M. Templ, A. Alfons, P. Filzmoser (2012) Exploring incomplete
data using visualization tools.  \emph{Journal of Advances in Data Analysis
and Classification}, Online first. DOI: 10.1007/s11634-011-0102-y.
}
\seealso{
\code{\link[=pairsVIM]{pairsVIM()}}, \code{\link[=marginmatrix]{marginmatrix()}}

Other plotting functions: 
\code{\link{aggr}()},
\code{\link{barMiss}()},
\code{\link{histMiss}()},
\code{\link{marginmatrix}()},
\code{\link{marginplot}()},
\code{\link{matrixplot}()},
\code{\link{mosaicMiss}()},
\code{\link{pairsVIM}()},
\code{\link{parcoordMiss}()},
\code{\link{pbox}()},
\code{\link{scattJitt}()},
\code{\link{scattMiss}()},
\code{\link{spineMiss}()}
}
\author{
Andreas Alfons, Matthias Templ, modifications by Bernd Prantner
}
\concept{plotting functions}
\keyword{hplot}