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)

