calcTStatFast           package:sigPathway           R Documentation

_C_o_m_p_u_t_e _T-_S_t_a_t_i_s_t_i_c_s _a_n_d _C_o_r_r_e_s_p_o_n_d_i_n_g _P-_V_a_l_u_e_s

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

     Computes t-statistics and corresponding p-values.

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

     calcTStatFast(tab, phenotype, ngroups = 2)

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

     tab: a numeric matrix of expression values, with the rows and
          columns representing probe sets and sample arrays,
          respectively

phenotype: a numeric (or character if 'ngroups' >= 2) vector indicating
          the phenotype

 ngroups: an integer indicating the number of groups in the expression
          matrix

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

     If there are two groups in the matrix, it is recommended to use 0
     and 1 to denote which sample columns belong to which group.  If
     the phenotype is a character vector, then the phenotype ranked
     first in the alphabet is considered as 0.

     If 'ngroups' = 2, the t-test done here is equivalent to a unpaired
     two-sample t-test, assuming unequal variances.  Please note that
     as of version 1.1.6, the sign of the t-statistic is positive when
     the mean of group 1 is greater than the mean of group 0.

     If there is only one group in the matrix (e.g., Alzheimer's data
     set as reanalyzed in Tian et al. (2005)), then the phenotype
     vector should consist of continuous values.  In this case, the
     association between phenotype and expression values is first
     calculated as Pearson correlation coefficients, transformed to
     Fisher's z, and then rescaled so that its variance is 1:

     z = 0.5*log((1+rho)/(1-rho))*sqrt(n-3), where n is the number of
     phenotypes.

     If 'ngroups' > 2, the f-statistics (from 1-way ANOVA) are
     calculated.  The user will need to check that the data have
     similar variances among the groups.

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

    pval: A vector of unadjusted p-values

   tstat: A vector of t-statistics ('ngroups' = 2) or rescaled Fisher's
          z ('ngroups' = 1)

     rho: (Also returned when 'ngroups' = 1) A vector of Pearson
          correlation coefficients

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

     Weil Lai

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

     ## Load inflammatory myopathy data set
     data(MuscleExample)
     statList <- calcTStatFast(tab, phenotype, ngroups = 2)

     ## Generate histogram of p-values
     hist(statList$pval, xlab = "Unadjusted p-values", ylab = "Frequency")

