Models               package:Rtreemix               R Documentation

_F_u_n_c_t_i_o_n_s _f_o_r _c_o_m_p_a_r_i_n_g _t_h_e _t_r_e_e _t_o_p_o_l_o_g_i_e_s _o_f _t_w_o _m_u_t_a_g_e_n_e_t_i_c _t_r_e_e_s _m_i_x_t_u_r_e _m_o_d_e_l_s

_D_e_s_c_r_i_p_t_i_o_n:

     These functions implement a similarity measure for comparing the
     topologies of the trees of two mixture models 'mixture1' and
     'mixture2'. 'comp.models' chaaracterizes the similarity of the
     models based on sum of the number of different edges of matched
     tree components (similarity pairs). 'comp.models.levels'
     quantifies the similarity of two mixture models by adding to the
     edge ddifference of each similarity pair in the previously
     described sum the L1 distance of the level vectors of the trees
     comprising the pair. A level vector can be associated to each tree
     component and denotes the depth of each of the genetic events in
     the tree.  It is necessary that the two models have the same
     number of tree components build on the same number of genetic
     events. It is assumed that the mixtures have at least two tree
     components.

_U_s_a_g_e:

     comp.models(mixture1, mixture2)
     comp.models.levels(mixture1, mixture2)

_A_r_g_u_m_e_n_t_s:

mixture1: An 'RtreemixModel' object specifying the first component for
          the similarity calculation.

mixture2: An 'RtreemixModel' object specifying the second component for
          the similarity calculation. The number of tree components
          equals the one of 'mixture1'.

_D_e_t_a_i_l_s:

     The value returned by the function 'comp.models' is between 0 (no
     similarity) and 1 (identical models).

_V_a_l_u_e:

     The functions return a numeric value that quantifies the
     similarity of the tree topologies of two mixture models.

_A_u_t_h_o_r(_s):

     Jasmina Bogojeska

_S_e_e _A_l_s_o:

     'RtreemixModel-class', 'comp.trees', 'fit-methods',
     'stability.sim'

_E_x_a_m_p_l_e_s:

     ## Generate two random RtreemixModel objects each with 3 components.
     rand.mod1 <- generate(K = 3, no.events = 9, noise.tree = TRUE, prob =
     c(0.2, 0.8))
     rand.mod2 <- generate(K = 3, no.events = 9, noise.tree = TRUE, prob =
     c(0.2, 0.8))

     ## Compare the topologies of the tree components of the two randomly
     ## generated models
     comp.models(rand.mod1, rand.mod2)
     comp.models.levels(rand.mod1, rand.mod2)

