MCMCSVDreg             package:MCMCpack             R Documentation

_M_a_r_k_o_v _C_h_a_i_n _M_o_n_t_e _C_a_r_l_o _f_o_r _S_V_D _R_e_g_r_e_s_s_i_o_n

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

     This function generates a sample from the posterior distribution
     of a linear regression model with Gaussian errors in which the
     design matrix has been decomposed with singular value
     decomposition.The sampling is done via the Gibbs sampling
     algorithm. The user supplies data and priors, and  a sample from
     the posterior distribution is returned as an mcmc object, which
     can be subsequently analyzed with functions  provided in the coda
     package.

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

     MCMCSVDreg(formula, data=parent.frame(), burnin = 1000, mcmc = 10000,
                thin=1, verbose = 0, seed = NA, tau2.start = 1,
                g0 = 0, a0 = 0.001, b0 = 0.001, c0=2, d0=2, w0=1,
                beta.samp=FALSE, intercept=TRUE, ...)

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

 formula: Model formula. Predictions are returned for elements of y
          that are coded as NA.

    data: Data frame.

  burnin: The number of burn-in iterations for the sampler.

    mcmc: The number of MCMC iterations after burnin.

    thin: The thinning interval used in the simulation.  The number of
          MCMC iterations must be divisible by this value.

 verbose: A switch which determines whether or not the progress of the
          sampler is printed to the screen.  If 'verbose' is greater
          than 0 the iteration number, the beta vector, and the error
          variance are printed to  the screen every 'verbose'th
          iteration.

    seed: The seed for the random number generator.  If NA, the
          Mersenne Twister generator is used with default seed 12345;
          if an integer is  passed it is used to seed the Mersenne
          twister.  The user can also pass a list of length two to use
          the L'Ecuyer random number generator, which is suitable for
          parallel computation.  The first element of the list is the
          L'Ecuyer seed, which is a vector of length six or NA (if NA 
          a default seed of 'rep(12345,6)' is used).  The second
          element of  list is a positive substream number. See the
          MCMCpack  specification for more details.

tau2.start: The starting values for the tau^2 vector. Can be either a
          scalar or a vector. If a scalar is passed then that value
          will be the starting value for all elements of tau^2.

      g0: The prior mean of gamma.  This can either be a  scalar or a
          column vector with dimension equal to the number of gammas.
          If this takes a scalar  value, then that value will serve as
          the prior mean for all of the betas.

      a0: a0/2 is the shape parameter for the inverse Gamma prior on
          sigma^2 (the variance of the disturbances). The amount of
          information in the inverse Gamma prior is something like that
          from a0 pseudo-observations.

      b0: b0/2 is the scale parameter for the inverse Gamma prior on
          sigma^2 (the variance of the disturbances). In constructing
          the inverse Gamma prior, b0 acts like the sum of squared
          errors from the a0 pseudo-observations.

      c0: c0/2 is the shape parameter for the inverse Gamma prior on
          tau[i]^2.

      d0: d0/2 is the scale parameter for the inverse Gamma prior on
          tau[i]^2.

      w0: The prior probability that gamma[i] = 0. Can be either a
          scalar or an N vector where N is the number of observations.

beta.samp: Logical indicating whether the sampled elements of beta
          should be stored and returned.

intercept: Logical indicating whether the original design matrix should
          include a constant term.

     ...: further arguments to be passed

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

     The model takes the following form:

                         y = X beta + epsilon

     Where the errors are assumed to be iid Gaussian:

                      epsilon_i ~ N(0, sigma^2)

     .

     Let N denote the number of rows of X and P the number of columns
     of X. Unlike the standard regression setup where N >> P here it is
     the case that P >> N.

     To deal with this problem a singular value decomposition of X' is
     performed: X' = ADF and the regression model becomes


                       y = F'D gamma + epsilon


     where gamma = A' beta. 

     We assume the following priors:


                    sigma^(-2) ~ Gamma(a0/2, b0/2)



                     tau^(-2) ~ Gamma(c0/2, d0/2)



 gamma[i] ~ w0[i] delta0 + (1-w0[i] N(g0[i], sigma^2  tau[i]^2/ d[i]^2)


     where delta0 is a unit point mass at 0 and d[i] is the ith
     diagonal element of D.

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

     An mcmc object that contains the posterior sample.  This  object
     can be summarized by functions provided by the coda package.

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

     West, Mike; Josheph Nevins; Jeffrey Marks; Rainer Spang, and Harry
     Zuzan. 2000. "DNA MICROARRAY DATA ANALYSIS AND REGRESSION MODELING
     FOR GENETIC EXPRESSION PROFILING" Duke ISDS working paper.

     Gottardo, Raphael, and Adrian Raftery. 2004. "Markov chain Monte
     Carlo with mixtures of singular distributions". Statistics
     department, University of Washington, Technical report 470. 

     Andrew D. Martin, Kevin M. Quinn, and Daniel Pemstein.  2004.  
     _Scythe Statistical Library 1.0._ <URL: http://scythe.wustl.edu>.

     Martyn Plummer, Nicky Best, Kate Cowles, and Karen Vines. 2002.
     _Output Analysis and Diagnostics for MCMC (CODA)_. <URL:
     http://www-fis.iarc.fr/coda/>.

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

     'plot.mcmc', 'summary.mcmc', 'lm'

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

     ## Not run: 
     ## End(Not run)

