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'

