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

