calculatePosteriorAvg          package:XDE          R Documentation

_C_a_l_c_u_l_a_t_e _t_h_e _p_o_s_t_e_r_i_o_r _a_v_e_r_a_g_e _f_o_r _i_n_d_i_c_a_t_o_r_s _o_f _c_o_n_c_o_r_d_a_n_t _a_n_d
_d_i_s_c_o_r_d_a_n_t _d_i_f_f_e_r_e_n_t_i_a_l _e_x_p_r_e_s_s_i_o_n

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

     This function calculates the posterior average for indicators of
     concordant and discordant differential expression from the saved
     log files. See details.

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

     calculatePosteriorAvg(object, NCONC=2, NDIFF=1)

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

  object: Object of class 'XdeMcmc'

   NCONC: Integer: number of studies for which the gene must be
          differentially expressed (in the same direction) to be
          classified as concordant differential expression

   NDIFF: Integer: number of studies for which a gene must be up- or
          down-regulated to be classified as differentially expressed.
          It is the union of concordant and discordant differential
          expression.

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

     For each iteration,

     1.  calculate the sign of delta * Delta

     2.  For each gene, compute the number of positive signs (P) and
     the number of negative signs (N) (a G x 2 matrix, where G is the
     number of genes in common)

     3.  for a given gene, the discordant indicator is simply when P *
     N is nonzero.

     4.  The concordant indicator requires P * N = 0 AND P + N >=
     NCONC, where NCONC is specified by the user.

     5.  differential expression is simply   | P | + | N |  >= NDIFF. 
     By default, NDIFF is 1 but can be user-specified.

     The posterior average is then computed from the mean over all MCMC
     iterations.

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

     A G x 3 matrix.

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

     RS

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

     'posteriorAvg'

