bootstrapCor           package:maigesPack           R Documentation

_C_a_l_c_u_l_a_t_e _b_o_o_t_s_t_r_a_p _p-_v_a_l_u_e_s _f_o_r _c_o_r_r_e_l_a_t_i_o_n _m_e_a_s_u_r_e_s

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

     This function takes a numerical matrix (or two vectors) and
     calculates bootstrapped (by permutation) p-values to test if the
     correlation value is equal to zero. If the first argument is a
     matrix, the p-values are calculated between all pairs of rows of
     the matrix.

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

     bootstrapCor(x, y=NULL, bRep, type="Rpearson", ret="p-value",
                  alternative="two.sided")

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

       x: numerical matrix or vector to be analysed. If a vector, the
          argument 'y' must be informed.

       y: numerical vector. Must be informed if 'x' is a vector. If 'x'
          is a matrix, this argument is ignored. Defaults to NULL.

    bRep: number of permutation to be done in the test.

    type: character string specifying the type of correlation statistic
          to be used. Possible values are 'Rpearson', 'pearson',
          'spearman' or 'kendall'.

     ret: character string with the value to return. Must be 'p-value'
          (default) for the usual p-value or 'max', to return the
          maximum absolute correlation value obtained by the
          permutation.

alternative: character specifying the type of test to do, must be
          'two.sided' (default), 'less' or 'greater'.

_D_e_t_a_i_l_s:

     Pearson, spearman and kendall types of correlation values are
     calculated by 'cor' function from package stats. The method
     Rpearson was developed in this package and is a generalisation of
     the _jackniffe_ correlation proposed by Heyer et al. (1999), it is
     calculated using the function 'robustCorr'.

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

     The result of this function is a square matrix (length equal to
     the number of rows of 'x') if 'x' is a matrix or a numerical value
     if 'x' and 'y' are vectors. The result is the p-values or maximum
     correlation values calculated by permutation tests.

_A_u_t_h_o_r(_s):

     Gustavo H. Esteves <gesteves@vision.ime.usp.br>

_R_e_f_e_r_e_n_c_e_s:

     Heyer, L.J.; Kruglyak, S. and Yooseph, S. Exploring expression
     data: identification and analysis of coexpressed genes, *Genome
     Research*, 9, 1106-1115, 1999 (<URL:
     http://www.genome.org/cgi/content/full/9/11/1106>)

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

     'cor', 'robustCorr'

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

     x <- runif(50, 0, 1)
     y <- rbeta(50, 1, 2)
     bootstrapCor(x, y, bRep=100)

     z <- matrix(rnorm(100, 0, 1), 4, 25)
     bootstrapCor(z, bRep=100)

