twilight.combi           package:twilight           R Documentation

_A_l_l _p_e_r_m_u_t_a_t_i_o_n_s _o_f _a _b_i_n_a_r_y _v_e_c_t_o_r

_D_e_s_c_r_i_p_t_i_o_n:

     For a given binary input vector, the function completely
     enumerates all possible permutations.

_U_s_a_g_e:

     twilight.combi(xin, pin, bin)

_A_r_g_u_m_e_n_t_s:

     xin: Binary input vector, e.g. class labels. 

     pin: Logical value. 'TRUE' if samples are paired, 'FALSE' if not. 

     bin: Logical value. 'TRUE' if permutations should be balanced,
          'FALSE' if not. 

_D_e_t_a_i_l_s:

     Please note, that the resulting permutations are always as
     "balanced" as possible. The balancing is done for the smaller
     subsample. If its sample size is odd, say 5, 'twilight.combi'
     computes all permutations with 2 or 3 samples unchanged. In the
     paired case, the output matrix contains only one half of all
     permutations. The second half is simply 1-'output' which leads to
     the same absolute test statistics in a paired test.

_V_a_l_u_e:

     Returns a matrix where each row contains one permuted vector. Note
     that even for balanced permutations, the first row always contains
     the original vector. If the number of rows exceeds 10000, 'NULL'
     is returned.

_A_u_t_h_o_r(_s):

     Stefanie Scheid <URL: http://www.molgen.mpg.de/~scheid>

_R_e_f_e_r_e_n_c_e_s:

     Scheid S and Spang R (2004): A stochastic downhill search
     algorithm for estimating the local false discovery rate, _IEEE
     TCBB_ *1(3)*, 98-108.

_S_e_e _A_l_s_o:

     'twilight.permute.pair', 'twilight.permute.unpair'

_E_x_a_m_p_l_e_s:

     x <- c(rep(0,4),rep(1,3))
     y <- twilight.combi(x,pin=FALSE,bin=FALSE)

