surfacePlot              package:mclust              R Documentation

_D_e_n_s_i_t_y _o_r _u_n_c_e_r_t_a_i_n_t_y _s_u_r_f_a_c_e _f_o_r _t_w_o _d_i_m_e_n_s_i_o_n_a_l _m_i_x_t_u_r_e_s.

_D_e_s_c_r_i_p_t_i_o_n:

     Plots a density or uncertainty surface  given data in more than
     two dimensions and parameters of an MVN mixture model for the
     data.

_U_s_a_g_e:

     surfacePlot(data, parameters, 
                 type = c("contour", "image", "persp"), 
                 what = c("density", "uncertainty"), 
                 transformation = c("none", "log", "sqrt"),          
                 grid = 50, nlevels = 20, scale = FALSE, 
                 xlim=NULL, ylim=NULL, 
                 identify = FALSE, verbose = FALSE, swapAxes = FALSE, ...)

_A_r_g_u_m_e_n_t_s:

    data: A numeric vector, matrix, or data frame of 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:

          _m_e_a_n The mean for each component. If there is more than one
               component, this is a matrix whose kth column is the mean
               of the _k_th component of the mixture model.

          _v_a_r_i_a_n_c_e A list of variance parameters for the model. The
               components of this list depend on the model
               specification. See the help file for 'mclustVariance'
               for details.

    type: Choose from one of the following three options: '"contour"'
          (default), '"image"', '"persp"' indicating the plot type.  

    what: Choose from one of the following options: '"density"'
          (default), '"uncertainty"' indicating what to plot.  

transformation: Choose from one of the following three options:
          '"none"' (default), '"log"', '"sqrt"' indicating a
          transformation to be applied before plotting.  

    grid: The number of grid points (evenly spaced on each axis).  The
          mixture density and uncertainty is computed at  'grid x grid'
          points to produce the surface plot. Default: '50'. 

 nlevels: The number of levels to use for a contour plot. Default:
          '20'. 

   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. 

xlim, ylim: An argument specifying bounds for the ordinate, abscissa of
          the plot. This may be useful for when comparing plots. 

identify: A logical variable indicating whether or not to add a title
          to the plot identifying the dimensions used. 

 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. 

swapAxes: A logical variable indicating whether or not the axes should
          be swapped for the plot. 

     ...: Other graphics parameters. 

_V_a_l_u_e:

     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.

_S_i_d_e _E_f_f_e_c_t_s:

     A plots showing (a transformation of) the density or uncertainty
     for the given mixture model and data.

_D_e_t_a_i_l_s:

     For an image plot, a color scheme may need to be selected on the
     display device in order to view the plot.

_R_e_f_e_r_e_n_c_e_s:

     C. Fraley and A. E. Raftery (2002). Model-based clustering,
     discriminant analysis, and density estimation. _Journal of the
     American Statistical Association 97:611-631_. 

     C. Fraley and A. E. Raftery (2006). MCLUST Version 3 for R: Normal
     Mixture Modeling and Model-Based Clustering,  Technical Report no.
     504, Department of Statistics, University of Washington.

_S_e_e _A_l_s_o:

     'mclust2Dplot'

_E_x_a_m_p_l_e_s:

     faithfulModel <- mclustModel(faithful,mclustBIC(faithful))
     surfacePlot(faithful, parameters = faithfulModel$parameters,
                 type = "contour", what = "density", transformation = "none",
                 drawlabels = FALSE)

