Description Usage Arguments Details Value References See Also Examples
Plots a density or uncertainty surface given bivariate data and parameters of a MVN mixture model for the data.
1 2 3 4 5 6 7 8 9  surfacePlot(data, parameters,
type = c("contour", "level", "image", "persp"),
what = c("density", "uncertainty"),
transformation = c("none", "log", "sqrt"),
grid = 100, nlevels = 11, levels = NULL,
color.palette = blue2grey.colors, col = grey(0.6),
xlim = NULL, ylim = NULL, xlab = NULL, ylab = NULL,
scale = FALSE, main = FALSE, swapAxes = FALSE,
verbose = FALSE, ...)

data 
A matrix, or data frame of bivariate observations. Categorical variables are not allowed. If a matrix or data frame, rows correspond to observations and columns correspond to variables. 
parameters 
A named list giving the parameters of an MCLUST model, used to produce superimposing ellipses on the plot. The relevant components are as follows:

type 
Choose from one of the following three options: 
what 
Choose from one of the following options: 
transformation 
Choose from one of the following three options: 
grid 
The number of grid points (evenly spaced on each axis).
The mixture density and uncertainty is computed at

nlevels 
The number of levels to use for a contour plot.
Default: 
levels 
A vector of levels at which to draw the lines in a contour plot. 
color.palette 
A function which defines a palette of colours to be used for

col 
The color to be used for drawing contour lines. 
xlim, ylim 
Optional argument specifying bounds for the ordinate, abscissa of the plot. This may be useful for when comparing plots. 
xlab, ylab 
Optional argument specifying labels for the xaxis and yaxis. 
scale 
A logical variable indicating whether or not the two dimensions should be plotted on the same scale, and thus preserve the shape of the distribution. The default is not to scale. 
main 
A logical variable or 
swapAxes 
A logical variable indicating whether or not the axes should be swapped for the plot. 
verbose 
A logical variable telling whether or not to print an indication that the function is in the process of computing values at the grid points, which typically takes some time to complete. 
... 
Other graphics parameters. 
For an image plot, a color scheme may need to be selected on the display device in order to view the plot.
A plots showing (a transformation of) the density or uncertainty for the given mixture model and data.
The function also returns an invisible list with components x
,
y
, and z
in which x
and y
are the values used to
define the grid and z
is the transformed density or uncertainty at the
grid points.
C. Fraley and A. E. Raftery (2002). Modelbased clustering, discriminant analysis, and density estimation. Journal of the American Statistical Association 97:611631.
C. Fraley, A. E. Raftery, T. B. Murphy and L. Scrucca (2012). mclust Version 4 for R: Normal Mixture Modeling for ModelBased Clustering, Classification, and Density Estimation. Technical Report No. 597, Department of Statistics, University of Washington.
1 2 3 4 5 6 7 8 9 10 11  ## Not run:
faithfulModel < Mclust(faithful)
surfacePlot(faithful, parameters = faithfulModel$parameters,
type = "contour", what = "density", transformation = "none",
drawlabels = FALSE)
surfacePlot(faithful, parameters = faithfulModel$parameters,
type = "persp", what = "density", transformation = "log")
surfacePlot(faithful, parameters = faithfulModel$parameters,
type = "contour", what = "uncertainty", transformation = "log")
## End(Not run)

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