sage.test             package:sagenhaft             R Documentation

_C_o_m_p_a_r_e _T_w_o _S_A_G_E _L_i_b_r_a_r_i_e_s

_D_e_s_c_r_i_p_t_i_o_n:

     Compute p-values for differential expression for each tag between
     two SAGE libraries.

_U_s_a_g_e:

     sage.test(x, y, n1=sum(x), n2=sum(y))

_A_r_g_u_m_e_n_t_s:

       x: integer vector giving counts in first library. Non-integer
          values are rounded to the nearest integer.

       y: integer vector giving counts in second library. Non-integer
          values are rounded to the nearest integer.

      n1: total number of tags in first library. Non-integer values are
          rounded to the nearest integer.

      n2: total number of tags in second library. Non-integer values
          are rounded to the nearest integer.

_D_e_t_a_i_l_s:

     This function uses a binomial approximation to the Fisher Exact
     test for each tag. The approximation is accurate when 'n1' and
     'n2' are large and 'x' and 'y' are small in comparison.

_V_a_l_u_e:

     Numeric vector of p-values.

_A_u_t_h_o_r(_s):

     Gordon Smyth

_S_e_e _A_l_s_o:

     'fisher.test'

_E_x_a_m_p_l_e_s:

     library(sagenhaft)
     sage.test(c(0,5,10),c(0,30,50),n1=10000,n2=15000)
     #  Exact equivalents
     fisher.test(matrix(c(0,0,10000-0,15000-0),2,2))$p.value
     fisher.test(matrix(c(5,30,10000-5,15000-30),2,2))$p.value
     fisher.test(matrix(c(10,50,10000-10,15000-50),2,2))$p.value

