mixproj                package:mclust                R Documentation

_D_i_s_p_l_a_y_s _o_n_e _s_t_a_n_d_a_r_d _d_e_v_i_a_t_i_o_n _o_f _a_n _M_V_N _m_i_x_t_u_r_e _c_l_a_s_s_i_f_i_c_a_t_i_o_n.

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

     `mixproj' displays one standard deviation of an MVN mxiture
     classification along with data in for selected pairs of
     coordinates. Function `mvn2plot' is used to plot the confidence
     ellipses.

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

     mixproj(data, ms, partition, dimens, scale = F, k = 15, xlim, ylim,
     xlab, ylab, col=partition, pch=partition, ...)
     mvn2plot(mu, sigma, k, add=T, col=NULL, xlim=NULL, ylim=NULL, xlab=NULL,
     ylab=NULL, ...)

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

    data: a matrix of onservations. 

      ms: The result of an `mstep' calculation (a list consisting of
          `mu' and `sigma'). 

partition: A integer vector giving an initial classification for each
          observation. 

  dimens: A vector of length two giving the two variables of the data
          to be plotted. If not provided, a random selection of two
          variables is made.

   scale: A logical variable telling whether or not the same scale
          should be used for both variables so as to preserve geometry.
          The default does not use the same  scale. 

       k: Number of subdivisions for plotting segments of ellipsoids.
          Default: 8. 

xlim, ylim, xlab, ylab, col, pch: Standard arguments to `plot' with
          default values. 

     add: Add ellipses from `mvn2plot' to the existing plot.

     ...: Further arguments to `plot'. 

      mu: Cluster centers. 

   sigma: Cluster covariance matrices.

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

     `mstep', `clpairs'

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

     data(iris)
     cl <- mhclass(mhtree(iris[,1:4], modelid = "VVV"),3)
     z <- me( iris[,1:4], modelid = "VVV", ctoz(cl))
     pars <- mstep(iris[,1:4], modelid="VVV", z)
     mixproj(iris[,1:4], ms=pars, partition=ztoc(z), dimens=c(1,2))
     ### Plot only one cluster
     mvn2plot(pars$mu[1:2,1], pars$sigma[1:2, 1:2, 1], 25, F, col="red")

