View source: R/MixtureMissing.R
plot.MixtureMissing | R Documentation |
Provide four model-based clustering plots for a MixtureMissing
object. The options
include (1) pairwise scatter plots showing cluster memberships and highlighting outliers denoted by triangles;
(2) pairwise scatter plots highlighting in red observations whose values are missing but are replaced by
expectations obtained in the EM algorithm; (3) parallel plot of up to the first 10 variables of a multivariate
data set; and (4) plots of estimated density in the form of contours. A single or multiple options
can be specified. In the latter case, interactive mode will be triggered for the user to choose.
## S3 method for class 'MixtureMissing'
plot(
x,
what = c("classification", "missing", "parallel", "density"),
nlevels = 15,
drawlabels = TRUE,
addpoints = TRUE,
cex.point = 1,
cex.axis = 1,
cex.labels = 2,
lwd = 1,
col_line = "gray",
...
)
x |
A |
what |
A string or a character vector specifying the desired plots. See the details section for a list of available plots. |
nlevels |
Number of contour levels desired; 15 by default. |
drawlabels |
Contour levels are labelled if |
addpoints |
Colored points showing cluster memberships are added if |
cex.point |
A numerical value giving the amount by which data points should be magnified relative to the default. |
cex.axis |
The magnification to be used for axis annotation. |
cex.labels |
A numerical value to control the character size of variable labels. |
lwd |
The contour line width, a positive number, defaulting to 1. |
col_line |
The color of contour; "gray" by default. |
... |
Arguments to be passed to methods, such as graphical parameters. |
The plots that can be retrieved include
If what = "classification"
- Pairwise scatter plots showing cluster memberships
and highlighting outliers denoted by triangles.
If what = "missing"
- Pairwise scatter plots highlighting in red observations
whose values are missing but are replaced by expectations obtained in the EM algorithm.
If what = "parallel"
- Parallel plot of up to the first 10 variables of a multivariate
data set.
If what = "density"
- Plots of estimated density in the form of contours.
No return value, called to visualize the fitted model's results
set.seed(123)
X <- hide_values(iris[, 1:4], n_cases = 20)
mod <- MCNM(X, G = 2, max_iter = 10)
plot(mod, what = 'classification')
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.