calcFDR                package:BGmix                R Documentation

_E_s_t_i_m_a_t_e _t_h_e _F_D_R (_f_a_l_s_e _d_i_s_c_o_v_e_r_y _r_a_t_e) _a_n_d _r_e_l_a_t_e_d _q_u_a_n_t_i_t_i_e_s _f_o_r _B_G_m_i_x _o_u_t_p_u_t.

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

     Given a threshold on the posterior probabilities, genes are
     declared as null or differentially expressed. For any given
     threshold, the FDR  (false discovery rate) and FNR (false
     non-discovery rate) can be estimated using the posterior
     probabilities. Estimated numbers of false positives and false
     negatives are also output.

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

     calcFDR(res, pcut = seq(0.01,0.5,0.01), true.z = NULL, q.print = F)

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

     res: list object output from ccParams (this includes the posterior
          classification probabilities) 

    pcut: scalar or vector of thresholds for which to estimate FDR etc. 

  true.z: vector of true classifications (if known, eg. for simulated
          data) 

 q.print: Print FDR etc. when pcut is a vector?

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

     If the true classification is known, it can be given as true.z,
     and the true FDR etc. for the threshold probability can be
     calculated.

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

fdr.est, fnr.est: scalars or vectors of estimated FDR, FNR

fp.est, fn.est: scalars or vectors of estimated no. false positives,
          no. false negatives

fdr.true, fnr.true: scalars or vectors of true FDR, FNR

fp.true, fn.true: scalars or vectors of true no. false positives, no.
          false negatives

npos, nneg: scalars or vectors of no. declared positives, no. declared
          negatives

prob.class: posterior classification probabilites (from the 'res'
          object input to this function)

  true.z: argument to function is output

    pcut: argument to function is output

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

     Alex Lewin

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

     ## Note this is a very short MCMC run!
     ## For good analysis need proper burn-in period.
     data(ybar,ss)
     outdir <- BGmix(ybar, ss, c(8,8), nburn=0, niter=100, nthin=1)
     params <- ccParams(outdir)
     fdr <- calcFDR(params)

