Description Usage Arguments Details Author(s) See Also Examples
View source: R/densityMclust.R
Plotting methods for an object of class 'mclustDensity'
. Available graphs
are plot of BIC values and density for univariate and bivariate data. For
higher data dimensionality a scatterplot matrix of pairwise densities is
drawn.
1 2 3 4 5 6 7 8 9 10 11 12 13 14  ## S3 method for class 'densityMclust'
plot(x, data = NULL, what = c("BIC", "density", "diagnostic"), ...)
plotDensityMclust1(x, data = NULL, hist.col = "lightgrey",
hist.border = "white", breaks = "Sturges", ...)
plotDensityMclust2(x, data = NULL, nlevels = 11, levels = NULL,
prob = c(0.25, 0.5, 0.75),
points.pch = 1, points.col = 1, points.cex = 0.8, ...)
plotDensityMclustd(x, data = NULL, nlevels = 11, levels = NULL,
prob = c(0.25, 0.5, 0.75),
points.pch = 1, points.col = 1, points.cex = 0.8,
gap = 0.2, ...)

x 
An object of class 
data 
Optional data points. 
what 
The type of graph requested:

hist.col 
The color to be used to fill the bars of the histogram. 
hist.border 
The color of the border around the bars of the histogram. 
breaks 
See the argument in function 
points.pch, points.col, points.cex 
The character symbols, colors, and magnification to be used for plotting 
nlevels 
An integer, the number of levels to be used in plotting contour densities. 
levels 
A vector of density levels at which to draw the contour lines. 
prob 
A vector of probability levels for computing HDR. Only used if 
gap 
Distance between subplots, in margin lines, for the matrix of pairwise scatterplots. 
... 
Additional arguments passed to 
The function plot.densityMclust
allows to obtain the plot of
estimated density or the graph of BIC values for evaluated models.
If what = "density"
the produced plot dependes on the dimensionality
of the data.
For onedimensional data a call with no data
provided produces a
plot of the estimated density over a sensible range of values. If
data
is provided the density is overplotted on a histogram for the
observed data.
For twodimensional data further arguments available are those accepted by
the surfacePlot
function. In particular, the density can be
represented through "contour"
, "level"
, "image"
, and
"persp"
type of graph.
For type = "level"
Highest Density Regions (HDRs) are plotted for
probability levels prob
. See link{hdrlevels}
for details.
For higher dimensionality a scatterplot matrix of pairwise densities is drawn.
Luca Scrucca
densityMclust
,
surfacePlot
,
densityMclust.diagnostic
,
Mclust
.
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  ## Not run:
dens < densityMclust(faithful$waiting)
summary(dens)
summary(dens, parameters = TRUE)
plot(dens, what = "BIC", legendArgs = list(x = "topright"))
plot(dens, what = "density", data = faithful$waiting)
dens < densityMclust(faithful)
summary(dens)
summary(dens, parameters = TRUE)
plot(dens, what = "density", data = faithful,
drawlabels = FALSE, points.pch = 20)
plot(dens, what = "density", type = "level")
plot(dens, what = "density", type = "level", prob = seq(0.1, 0.9, by = 0.1))
plot(dens, what = "density", type = "level", data = faithful)
plot(dens, what = "density", type = "persp")
dens < densityMclust(iris[,1:4])
summary(dens, parameters = TRUE)
plot(dens, what = "density", data = iris[,1:4],
col = "slategrey", drawlabels = FALSE, nlevels = 7)
plot(dens, what = "density", type = "level", data = iris[,1:4])
plot(dens, what = "density", type = "persp", col = grey(0.9))
## End(Not run)

Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.