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)

