RtreemixSim-class          package:Rtreemix          R Documentation

_C_l_a_s_s "_R_t_r_e_e_m_i_x_S_i_m"

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

     This class contains data simulated from the 'RtreemixModel' it
     extends together with their sampling and waiting times. It also
     includes the sampling mode and the sampling parameter used for the
     time simulation.

_O_b_j_e_c_t_s _f_r_o_m _t_h_e _C_l_a_s_s:

     Objects can be created by calls of the form 'new("RtreemixSim",
     Model, SimPatterns, SamplingMode, SamplingParam, WaitingTimes,
     SamplingTimes)'. The 'RtreemixSim' class specifies patterns
     ('RtreemixData') simulated from the parent 'RtreemixModel'
     together with their waiting and sampling times resulting from the
     waiting time simulation along the branchings in the parent model.

     The 'Model' is an 'RtreemixModel' object used in the data and time
     simulation process. In other words, this model is used for
     simulating patterns with their sampling and waiting times.

     The 'SimPatterns' is an 'RtreemixData' object that contains the
     patterns simulated from the given 'Model'.

     The 'SamplingMode' is a 'character' that specifies the sampling
     mode ("constant" or "exponential") used in the time simulations.

     The 'SamplingParam' is a 'numeric' that specifies the sampling
     parameter corresponding to the sampling mode given by
     'SamplingMode'.

     The 'WaitingTimes' is a numeric 'vector' that specifies the
     waiting times for the simulated patterns. Its length equals the
     number of patterns in 'SimPatterns'.

     The 'SamplingTimes' is a numeric 'vector' that specifies the
     sampling times for the simulated patterns. Its length equals the
     number of patterns in 'SimPatterns'.

_S_l_o_t_s:


     '_S_i_m_P_a_t_t_e_r_n_s': Object of class '"RtreemixData"'.

     '_S_a_m_p_l_i_n_g_M_o_d_e': Object of class '"character"'. It can have one of
          the two possible values: "constant" or "exponential".

     '_S_a_m_p_l_i_n_g_P_a_r_a_m': Object of class '"numeric"'.

     '_W_a_i_t_i_n_g_T_i_m_e_s': Object of class '"numeric"'. The length of
          'WaitingTimes' must be equal to the number of patterns in
          'SimPatterns'.

     '_S_a_m_p_l_i_n_g_T_i_m_e_s': Object of class '"numeric"'. The length of
          'SamplingTimes' must be equal to the number of patterns in
          'SimPatterns'.

_E_x_t_e_n_d_s:

     Class '"RtreemixModel"', directly. Class '"RtreemixData"', by
     class "RtreemixModel", distance 2.

_M_e_t_h_o_d_s:


     _S_a_m_p_l_i_n_g_M_o_d_e 'signature(object = "RtreemixSim")': A method for
          obtaining the sampling mode ("constant" or "exponential")
          used for the time simulations.

     _S_a_m_p_l_i_n_g_P_a_r_a_m 'signature(object = "RtreemixSim")': A method for
          obtaining the sampling parameter corresponding to the
          specified 'SamplingMode'.

     _S_a_m_p_l_i_n_g_T_i_m_e_s 'signature(object = "RtreemixSim")': A method used
          for obtaining the sampling times of the patterns in
          'SimPatterns'.

     _S_i_m_P_a_t_t_e_r_n_s 'signature(object = "RtreemixSim")': A method used for
          obtaining the patterns simulated from the parent model.

     _W_a_i_t_i_n_g_T_i_m_e_s 'signature(object = "RtreemixSim")': A method used
          for obtaining the waiting times of the patterns in
          'SimPatterns'.

     _g_e_t_M_o_d_e_l 'signature(object = "RtreemixSim")': A method for
          obtaining the mixture model used in the simulations.

     _n_o_D_r_a_w_s 'signature(object = "RtreemixSim")': A method for
          obtaining the number of simulated patterns, i.e. the size of
          'SimPatterns'.

_A_u_t_h_o_r(_s):

     Jasmina Bogojeska

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

     Learning multiple evolutionary pathways from cross-sectional data,
     N. Beerenwinkel et al.

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

     'RtreemixGPS-class', 'RtreemixData-class', 'RtreemixModel-class',
     'fit-methods', 'sim-methods'

_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)

     ## Create an RtreemixSim object by simulating patterns with their sampling and waiting times from a given mixture model.
     sim.data <- sim(model = rand.mod, sampling.mode = "exponential", sampling.param = 1, no.sim = 200)
     show(sim.data)

     ## See the slots from the RtreemixSim object.
     SimPatterns(sim.data)
     SamplingMode(sim.data)
     SamplingParam(sim.data)
     WaitingTimes(sim.data)
     SamplingTimes(sim.data)
     ## See model.
     getModel(sim.data)
     ## See number of simulated patterns.
     noDraws(sim.data)

