BGmix-package             package:BGmix             R Documentation

_B_G_m_i_x _f_i_t_s _a _v_a_r_i_e_t_y _o_f _B_a_y_e_s_i_a_n _h_i_e_r_a_r_c_h_i_c_a_l _m_o_d_e_l_s _f_o_r _f_i_n_d_i_n_g _d_i_f_f_e_r_e_n_t_i_a_l _g_e_n_e _e_x_p_r_e_s_s_i_o_n _b_e_t_w_e_e_n _2 _o_r _m_o_r_e _e_x_p_e_r_i_m_e_n_t_a_l _c_o_n_d_i_t_i_o_n_s.

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

     BGmix uses a C++ routine to fit the chosen model via an MCMC
     algorithm. Files are written to a sub-directory in the working
     directory. The package includes R functions for reading the
     results into R, and several plotting functions and functions for
     estimating error rates.

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


       Package:  BGmix
       Type:     Package
       Version:  1.0
       Date:     2007-02-01
       License:  GPL

     See Vignette for details of how to use this package (use
     openVignette()).

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

     Alex Lewin and Natalia Bochkina

     Maintainer: Alex Lewin <a.m.lewin@imperial.co.uk>

_R_e_f_e_r_e_n_c_e_s:

     Lewin, A., Bochkina, N. and Richardson, S. (2007), Fully Bayesian
     mixture model for differential gene expression: simulations and
     model checks. <URL: http://www.bgx.org.uk/publications.html>

_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,trace.pred=1)

     ## Basic plot of parameters
     params <- ccParams(outdir)
     plotBasic(params,ybar,ss)

     ## plots of FDR and related quantities
     fdr <- calcFDR(params)
     par(mfrow=c(1,2))
     plotFDR(fdr)

     ## plots of Bayesian p-values
     ## for predictive checks of mixture prior 
     pred <- ccPred(outdir,q.trace=TRUE)
     plotPredChecks(pred$pval.ybar.mix2,params$pc,probz=0.5)

     ## plots of predictive density superimposed on data
     plotMixDensity(params,pred,ybar,ss)

