bootstrap-methods          package:Rtreemix          R Documentation

_M_e_t_h_o_d _f_o_r _f_i_t_t_i_n_g _a _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 _a_n_d _a_n_a_l_y_z_i_n_g _i_t_s _v_a_r_i_a_n_c_e

_D_e_s_c_r_i_p_t_i_o_n:

     This method fits an 'RtreemixModel' to a given dataset and then
     analyzes its variance with the bootstrap method. The 'data' and
     the number of trees 'K' have to be specified.

_U_s_a_g_e:

     ## S4 method for signature 'RtreemixData, numeric':
     bootstrap(data, K, ...)

_A_r_g_u_m_e_n_t_s:

    data: An 'RtreemixData' object giving the dataset used for learning
          the trees mixture model. 

       K: An 'integer' larger than 0 specifying the number of
          branchings in the mixture model.

     ...: 'no.start.sol' is an 'integer' larger than 0 specifying the
          number of starting solutions for the k-means algorithm. The
          default value is 100. 'eps' is a 'numeric' giving the minimum
          conditional probability to include edge. The default value is
          0. 'weighing' is a 'logical' specifying whether to use
          special weights log(Pr(v)) for the edges (root, v). The
          default value is 'FALSE'. 'equal.edgeweights' is a 'logical'
          specifying whether to use equal edge weights in the noise
          component. The default value is 'TRUE'. When you have few
          data samples always use its default value  ('TRUE') to ensure
          nonzero probabilities for all possible  patterns (sets of
          events). '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. 'B' is an 'integer' larger
          than 0 specifying the number of bootstrap samples. Its
          default value is 1000. 'conf.interval' is a 'numeric'
          specifying the Confidence level for the intervals. Its
          default value is 0.05. 

_V_a_l_u_e:

     The function returns an object from the class 'RtreemixModel'.
     This is the mixture model learned on the given 'data'. Besides the
     edge weights it also contains their confidence intervals resulting
     from the bootstrap analysis. Confidence intervals for the mixture
     parameters are also comupted and available.

_N_o_t_e:

     The bootstrap examples are time consuming. They are commented out
     because of the time restrictions of the check of the package. For
     trying out the code please copy it and uncomment it.

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

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

_E_x_a_m_p_l_e_s:

     ## Create an RtreemixData object from a randomly generated RtreemixModel object.
     #rand.mod <- generate(K = 2, no.events = 7, noise.tree = TRUE, prob = c(0.2, 0.8))
     #data <- sim(model = rand.mod, no.draws = 300)

     ## Create a RtreemixModel and analyze its variance with the bootstrap method.
     #mod.boot <- bootstrap(data = data, K = 2, equal.edgeweights = TRUE, B = 10) ## time consuming computation

     ## See the confidence intervals for the mixture parameters (the weights).
     #WeightsCI(mod.boot)
     ## See the confidence intervals of the conditional probabilities assigned to the edges.
     #edgeData(getTree(mod.boot, 2), attr = "ci")

