mclust1Dplot             package:mclust             R Documentation

_P_l_o_t _o_n_e-_d_i_m_e_n_s_i_o_n_a_l _d_a_t_a _m_o_d_e_l_l_e_d _b_y _a_n _M_V_N _m_i_x_t_u_r_e.

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

     Plot one-dimensional data given parameters of an MVN mixture model
      for the data.

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

     mclust1Dplot(data, ...,
                  type = c("classification","uncertainty","density","errors"),
                  ask = TRUE, symbols, grid = 100, identify = FALSE, CEX = 1, xlim) 

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

    data: A numeric vector of observations. Categorical variables are
          not allowed. 

     ...: One or more of the following:

          _c_l_a_s_s_i_f_i_c_a_t_i_o_n A numeric or character vector representing a
               classification of observations (rows) of 'data'.

          _u_n_c_e_r_t_a_i_n_t_y A numeric vector of values in _(0,1)_ giving the
               uncertainty of each data point.

          _z A matrix in which the _[i,k]_the entry gives the
               probability of observation _i_ belonging to the _k_th
               class.  Used to compute 'classification' and
               'uncertainty' if those arguments aren't available.

          _t_r_u_t_h A numeric or character vector giving a known
               classification of each data point. If 'classification'
               or 'z' is also present, this   is used for displaying
               classification errors.

          _m_u A vector whose entries are the means of each group. 

          _s_i_g_m_a Either a vector whose entries are the variances for
               each group or a scalar giving a common variance for the
               groups.

          _p_r_o The vector of mixing proportions.

    type: Any subset of
          'c("classification","uncertainty","density","errors")'. The
          function will produce the corresponding plot if it has been
          supplied sufficient information to do so. If more than one
          plot is possible then users will be asked to choose from a
          menu if 'ask=TRUE'.  

     ask: A logical variable indicating whether or not a menu should be
          produced when more than one plot is possible. The default is
          'ask=TRUE'. 

 symbols: Either an integer or character vector assigning a plotting
          symbol to each unique class 'classification'. Elements in
          'symbols' correspond to classes in 'classification' in order
          of appearance in the observations (the order used by the 
          function 'unique'). The default is to use a single plotting
          symbol _|_. Classes are delineated by showing them in
          separate lines above the whole of the data. 

    grid: Number of grid points to use. 

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

     CEX: An argument specifying the size of the plotting symbols.  The
          default value is 1. 

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

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

     One or more plots showing location of the mixture components,
     classification, uncertainty, density and/or classification errors.
     Points in the different classes are shown in separate lines above
     the whole of the data.

_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_.  See <URL:
     http://www.stat.washington.edu/mclust>.

     C. Fraley and A. E. Raftery (2002). MCLUST:Software for
     model-based clustering, density estimation and discriminant
     analysis. Technical Report, Department of Statistics, University
     of Washington.  See <URL: http://www.stat.washington.edu/mclust>.

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

     'mclust2Dplot', 'clPairs', 'coordProj', 'do.call'

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

     n <- 250 ## create artificial data
     set.seed(0)
     y <- c(rnorm(n,-5), rnorm(n,0), rnorm(n,5))
     yclass <- c(rep(1,n), rep(2,n), rep(3,n))

     yEMclust <- summary(EMclust(y),y)

     mclust1Dplot(y, identify = TRUE, truth = yclass, z = yEMclust$z, ask=FALSE,
                  mu = yEMclust$mu, sigma = yEMclust$sigma, pro = yEMclust$pro)

     do.call("mclust1Dplot",
             c(list(data = y, identify = TRUE, truth = yclass, ask=FALSE), 
             yEMclust))

