generate-methods          package:Rtreemix          R Documentation

_M_e_t_h_o_d _f_o_r _g_e_n_e_r_a_t_i_n_g _a _r_a_n_d_o_m _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

_D_e_s_c_r_i_p_t_i_o_n:

     Function for generating a random mutagenetic mixture model. Each
     tree component from the model is drawn uniformly at random from
     the tree topology space by using the Pr\"ufer encoding of trees.  
     The number of tree components and the number of genetic events
     have to be specified.

_U_s_a_g_e:

     ## S4 method for signature 'numeric, numeric':
     generate(K, no.events, ...)

_A_r_g_u_m_e_n_t_s:

       K: An 'integer' larger than 0 specifying the number of
          branchings in the mixture model.

no.events: An 'integer' larger than 0 specifying the number of genetic
          events in the mixture model.

     ...: 'noise.tree' is a 'logical' indicating the presence of a
          noise (star) component in the random mixture model. The
          default value is 'TRUE'. 'equal.edgeweights' is a 'logical'
          specifying whether to use equal edge weights in the noise
          component. The default value is 'TRUE'. 'prob' is a 'numeric'
          vector of length 2 specifying the boundaries for the edge
          weights of the randomly generated trees. The first component
          of the vector (the lower boundary) must be smaller than the
          second component (the upper boundary). The default value is
          (0.0, 1.0). 'seed' is a positive 'integer' specifying the
          random generator seed. The default value is (-1) and then the
          time is used as a random generator. 

_V_a_l_u_e:

     The method returns an 'RtreemixModel' object that represents the
     randomly generated K-trees mixture model.

_A_u_t_h_o_r(_s):

     Jasmina Bogojeska

_R_e_f_e_r_e_n_c_e_s:

     Beweis eines Satzes \"uber Permutationen, H. Pr\"ufer; Learning
     multiple evolutionary pathways from cross-sectional data, N.
     Beerenwinkel et al.; Model Selection for Mixtures of Mutagenetic
     Trees, Yin et al.

_S_e_e _A_l_s_o:

     'RtreemixModel-class'

_E_x_a_m_p_l_e_s:

     ## Generate a random RtreemixModel object with 3 components and 9 genetic events.
     rand.mod <- generate(K = 3, no.events = 9, noise.tree = TRUE, prob = c(0.2, 0.8))
     show(rand.mod)

