confIntGPS-methods         package:Rtreemix         R Documentation

_M_e_t_h_o_d _f_o_r _c_a_l_c_u_l_a_t_i_n_g _G_P_S _v_a_l_u_e_s _a_n_d _t_h_e_i_r _9_5% _b_o_o_t_s_t_r_a_p
_c_o_n_f_i_d_e_n_c_e _i_n_t_e_r_v_a_l_s

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

     The method first calculates the genetic progression score (GPS)
     for the patterns in a given dataset 'data' based on a fitted
     mutagenetic trees mixture model with 'K' components. The 'data'
     and 'K' have to be specified. Then, it derives a 95% confidence
     intervals for the GPS values with bootstrap analysis.

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

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

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

    data: An 'RtreemixData' object containing the samples (patterns of
          genetic events) for which the GPS values and their bootstrap
          confidence intervals are to be calculated. The number  of
          genetic events should NOT be greater than 20.

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

     ...: 'sampling.mode' is a 'character' that specifies the sampling
          mode ("constant" or "exponential") used in the waiting time
          simulations. Its default value is "exponential".
          'sampling.param' is a 'numeric' that specifies the sampling
          parameter corresponding to the sampling mode given by
          'sampling.mode'. Its default value is 1. 'no.sim' is an
          'integer' larger than 0 giving the number of iterations for
          the waiting time simulation. Its default values is 10000. 'B'
          is an 'integer' larger than 0 specifying the number of
          bootstrap samples used in the bootstrap analysis. Its default
          value is 1000. 'equal.star' is a 'logical' specifying whether
          to use equal edge weights in the noise component. The default
          value is 'TRUE'. 

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

     The function returns an object from the 'RtreemixGPS' class that
     containes the calculated GPS values, their 95% confidence
     intervals, the model used for the computation, the data, and so on
     (see 'RtreemixGPS-class'). The GPS values are represented as a
     'numeric' vector with length equal to the number of samples in
     'data'. Their corresponding confidence intervals are given in a
     matrix with two columns.

_N_o_t_e:

     The data for which the GPS values and their corresponding 
     confidence intervals are to be calculated should not have more 
     than 20 genetic events. The reason for this is that the number of
     all possible patterns  for which the GPS values are calculated
     during a computationally intensive simulations  is in this case
     $2^20$. This demands too much memory. The GPS 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

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

     'RtreemixGPS-class',  'gps-methods', '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 = 400)

     ## Create an RtreemixGPS object by calculating GPS values for a given dataset
     ## and their 95% confidence intervals using the bootstrap method.
     #modGPS2 <- confIntGPS(data = data, K = 2, B = 100) ## time consuming computation
     #show(modGPS2)

     ## See the GPS values for the object modGPS2 and their confidence intervals.
     #GPS(modGPS2)
     #gpsCI(modGPS2)

     ## See data.
     #getData(modGPS2)

