hem                   package:HEM                   R Documentation

_H_e_t_e_r_o_g_e_n_e_o_u_s _E_r_r_o_r _M_o_d_e_l _f_o_r _I_d_e_n_t_i_f_i_c_a_t_i_o_n _o_f _D_i_f_f_e_r_e_n_t_i_a_l _E_x_p_r_e_s_s_e_d _G_e_n_e_s _U_n_d_e_r _M_u_l_t_i_p_l_e _C_o_n_d_i_t_i_o_n_s

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

     Fits an error model with heterogeneous experimental and biological
     variances.

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

     hem(dat, probe.ID=NULL, n.layer, design, burn.ins=1000, n.samples=3000,
         method.var.e="gam", method.var.b="gam", method.var.t="gam",           
         var.e=NULL, var.b=NULL, var.t=NULL, var.g=1, var.c=1, var.r=1,
         alpha.e=3, beta.e=.1, alpha.b=3, beta.b=.1, alpha.t=3, beta.t=.2,
         n.digits=10, print.message.on.screen=TRUE)

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

     dat: data

probe.ID: a vector of probe set IDs

 n.layer: number of layers; 1=one-layer EM, 2=two-layer EM

  design: design matrix

burn.ins: number of burn-ins for MCMC

n.samples: number of samples for MCMC

method.var.e: prior specification method for experimental variance; 
          "gam"=Gamma(alpha,beta),  "peb"=parametric EB prior
          specification,  "neb"=nonparametric EB prior specification

method.var.b: prior specification method for biological variance; 
          "gam"=Gamma(alpha,beta),  "peb"=parametric EB prior
          specification

method.var.t: prior specification method for total variance; 
          "gam"=Gamma(alpha,beta),  "peb"=parametric EB prior
          specification,  "neb"=nonparametric EB prior specification

   var.e: prior estimate matrix for experimental variance

   var.b: prior estimate matrix for biological variance

   var.t: prior estimate matrix for total variance

   var.g: N(0, var.g); prior parameter for gene effect

   var.c: N(0, var.c); prior parameter for condition effect

   var.r: N(0, var.r); prior parameter for interaction effect of gene
          and condition

alpha.e, beta.e: Gamma(alpha.e,alpha.e); prior parameters for inverse
          of experimental variance

alpha.b, beta.b: Gamma(alpha.b,alpha.b); prior parameters for inverse
          of biological variance

alpha.t, beta.t: Gamma(alpha.b,alpha.b); prior parameters for inverse
          of total variance

n.digits: number of digits

print.message.on.screen: if TRUE, process status is shown on screen.

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

  n.gene: numer of genes

  n.chip: number of chips

  n.cond: number of conditions

  design: design matrix

burn.ins: number of burn-ins for MCMC

n.samples: number of samples for MCMC

  priors: prior parameters

    m.mu: estimated mean expression intensity for each gene under each
          condition

     m.x: estimated unobserved expression intensity for each
          combination of genes, conditions, and individuals (n.layer=2)

 m.var.b: estimated biological variances (n.layer=2)

 m.var.e: estimated experiemental variances (n.layer=2)

 m.var.t: estimated total variances (n.layer=1)

       H: H-scores

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

     HyungJun Cho and Jae K. Lee

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

     Cho, H. and Lee, J.K. (2004) Bayesian Hierarchical Error Model for
     Analysis of Gene Expression Data,  Bioinformatics, 20: 2016-2025.

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

     'hem.eb.prior',  'hem.fdr'

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

     #Example 1: Two-layer HEM

     data(pbrain)

     ##construct a design matrix
     cond <- c(1,1,1,1,1,1,2,2,2,2,2,2) #condition
     ind  <- c(1,1,2,2,3,3,1,1,2,2,3,3) #biological replicate
     rep  <- c(1,2,1,2,1,2,1,2,1,2,1,2) #experimental replicate
     design <- data.frame(cond,ind,rep)

     ##normalization
     pbrain.nor <- hem.preproc(pbrain[,2:13])

     ##fit HEM with two layers of error
     ##using the small numbers of burn-ins and MCMC samples for a testing purpose;
     ##but increase the numbers for a practical purpose 
     #pbrain.hem <- hem(pbrain.nor, n.layer=2, design=design, 
     #                  burn.ins=10, n.samples=30)

     ##print H-scores
     #pbrain.hem$H 

     #Example 2: One-layer HEM

     data(mubcp)

     ##construct a design matrix
     cond <- c(rep(1,6),rep(2,5),rep(3,5),rep(4,5),rep(5,5))
     ind  <- c(1:6,rep((1:5),4))
     design <- data.frame(cond,ind)

     ##construct a design matrix
     mubcp.nor <- hem.preproc(mubcp)

     #fit HEM with one layers of error
     #using the small numbers of burn-ins and MCMC samples for a testing purpose;
     #but increase the numbers for a practical purpose 
     #mubcp.hem <- hem(mubcp.nor, n.layer=1,design=design, burn.ins=10, n.samples=30)

     ##print H-scores
     #mubcp.hem$H

     ###NOTE: Use 'hem.fdr' for FDR evaluation
     ###NOTE: Use 'hem.eb.prior' for Empirical Bayes (EB) prior sepecification
     ###NOTE: Use EB-HEM ('hem' after 'hem.eb.prior') for small data sets

