compCDF               package:mixtools               R Documentation

_P_l_o_t _t_h_e _C_o_m_p_o_n_e_n_t _C_D_F

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

     Plot the components' CDF via the posterior probabilities.

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

     compCDF(x, weights)

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

       x: A matrix containing the raw data. Rows are subjects and
          columns are repeated measurements.

 weights: The weights to compute the empirical CDF; however, most of
          time they are the posterior probabilities.

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

     'compCDF' returns an object which is a list with components: 

  result: The component means and standard deviations for a k-component
          mixture.

    plot: The plotted component CDF.

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

     McLachlan, G. J. and Peel, D. (2000) _Finite Mixture Models_, John
     Wiley & Sons, Inc.

     Elmore, R. T., Hettmansperger, T. P. and Xuan, F. (2004) The Sign
     Statistic, One-Way Layouts and Mixture Models, _Statistical
     Science_ *19(4)*, 579-587.

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

     'makemultdata', 'multmixmodel.sel', 'multmixEM'.

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

     ## The sulfur content of the coal seams in Texas

     A<-c(1.51, 1.92, 1.08, 2.04, 2.14, 1.76, 1.17)
     B<-c(1.69, 0.64, .9, 1.41, 1.01, .84, 1.28, 1.59) 
     C<-c(1.56, 1.22, 1.32, 1.39, 1.33, 1.54, 1.04, 2.25, 1.49) 
     D<-c(1.3, .75, 1.26, .69, .62, .9, 1.2, .32) 
     E<-c(.73, .8, .9, 1.24, .82, .72, .57, 1.18, .54, 1.3)

     dis.coal<-makemultdata(A, B, C, D, E, 
                            cuts = median(c(A, B, C, D, E)))
     temp<-multmixEM(dis.coal$y, lambda = dis.coal$lambda, 
                     theta = dis.coal$theta)

     ## Now plot the components' CDF via the posterior probabilities

     compCDF(dis.coal$x, temp$posterior)

