simGG                  package:gaga                  R Documentation

_P_r_i_o_r _p_r_e_d_i_c_t_i_v_e _s_i_m_u_l_a_t_i_o_n

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

     Simulates parameters and data from the prior-predictive of GaGa or
     MiGaGa model with several groups, fixing the hyper-parameters.

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

     simGG(n, m, p.de=.1, a0, nu, balpha, nualpha, equalcv = TRUE, probclus
     = 1, a = NA, l = NA, useal = FALSE)

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

       n: Number of genes. 

       m: Vector indicating number of observations to be simulated for
          each group.

    p.de: Probability that a gene is differentially expressed. 

  a0, nu: Mean expression for each gene is generated from
          '1/rgamma(a0,a0/nu)' if 'probclus' is of length 1, and from a
          mixture if 'length(probclus)>1'.

balpha, nualpha: Shape parameter for each gene is generated from
          'rgamma(balpha,balpha/nualpha)'.

 equalcv: If 'equalcv==TRUE' the shape parameter is simulated to be
          constant across groups.

probclus: Vector with the probability of each component in the mixture.
          Set to 1 for the GaGa model.

    a, l: Optionally, if 'useal==TRUE' the parameter values are not
          generated, only the data is generated. 'a' is a matrix with
          the shape parameters of each gene and group and 'l' is a
          matrix with the mean expressions. 

   useal: For 'useal==TRUE' the parameter values specified in 'a' and
          'l' are used, instead of being generated.

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

     The shape parameters are actually drawn from a gamma approximation
     to their posterior distribution. The function 'rcgamma' implements
     this approximation.

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

     Object of class 'ExpressionSet'. Expression values can be accessed
     via 'exprs(object)' and the parameter values used to generate the
     expression values can be accessed via 'fData(object)'.

_N_o_t_e:

     Currently, the routine only implements prior predictive simulation
     for the 2 hypothesis case.

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

     David Rossell

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

     Rossell D. GaGa: a simple and  flexible hierarchical model for
     microarray data analysis. <URL:
     http://rosselldavid.googlepages.com>.

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

     'simnewsamples' to simulate from the posterior predictive,
     'checkfit' for graphical posterior predictive checks.

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

     #Not run. Example from the help manual
     #library(gaga)
     #set.seed(10)
     #n <- 100; m <- c(6,6)
     #a0 <- 25.5; nu <- 0.109
     #balpha <- 1.183; nualpha <- 1683
     #probpat <- c(.95,.05)
     #xsim <- simGG(n,m,p.de=probpat[2],a0,nu,balpha,nualpha)
     #
     #plot(density(xsim$x),main='')
     #plot(xsim$l,xsim$a,ylab='Shape',xlab='Mean')

