distribution-methods        package:Rtreemix        R Documentation

_M_e_t_h_o_d _f_o_r _g_e_n_e_r_a_t_i_n_g _t_h_e (_s_c_a_l_e_d) _p_r_o_b_a_b_l_i_l_i_t_y _d_i_s_t_r_i_b_u_t_i_o_n
_i_n_d_u_c_e_d _w_i_t_h _a _g_i_v_e_n _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:

     These functions generate the probability distribution induced with
     a given mutagenetic trees mixture model 'model' on the space of
     all possible patterns of genetic events. The 'model' has to be
     specified. The sampling mode and the parameters for the sampling
     times of the observed input and output probabilities are optional.
     The number of genetic events in the 'model' cannot exceed 30.

_U_s_a_g_e:

     ## S4 method for signature 'RtreemixModel, missing,
     ##   missing, missing':
     distribution(model, sampling.mode, sampling.param, output.param)
     ## S4 method for signature 'RtreemixModel, character,
     ##   numeric, numeric':
     distribution(model, sampling.mode,
     sampling.param, output.param)

_A_r_g_u_m_e_n_t_s:

   model: An 'RtreemixModel' object that encodes a probability
          distribution on the set of all possible patterns.

sampling.mode: A 'character' that specifies the sampling mode
          ("constant" or "exponential") for the observed input and
          output probabilities.

sampling.param: A 'numeric' that specifies the sampling parameter for
          the observed input probabilities corresponding to the
          sampling mode given by 'sampling.mode'.

output.param: A 'numeric' that specifies the sampling parameter for the
          observed output probabilities corresponding to the sampling
          mode given by 'sampling.mode'.

_V_a_l_u_e:

     The function returns a 'dataframe' of all possible patterns with
     their corresponding probabilities derived from the specified trees
     mixture model. When the sampling mode and the sampling parameters
     (input and output) are specified their values are printed out.

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

     'RtreemixModel-class', 'fit-methods'

_E_x_a_m_p_l_e_s:

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

     ## See the probability distribution encoded by the model on the set of all possible patterns.
     distr <- distribution(model = mod)
     distr

     ## Get the probabilities.
     distr$probability

     ## See the probability distribution encoded by the model on the set of all possible patterns
     ## calculated for given sampling mode, and corresponding input and output parameters.
     distr1 <- distribution(model = mod, sampling.mode = "exponential", sampling.param = 1, output.param = 1)
     distr1

