swapbc1                 package:bqtl                 R Documentation

_S_a_m_p_l_e _B_C_1 _o_r _R_e_c_o_m_b_i_n_a_n_t _I_n_b_r_e_d _l_o_c_i  _v_i_a _a_p_p_r_o_x_i_m_a_t_e _p_o_s_t_e_r_i_o_r.

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

     An MCMC sampler for loci using precomputed dispersion matrices,
     various priors, and a pre-selected set of variables.  For use with
     BC1 (backcross) designs and recombinant inbred lines.

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

     swapbc1(varcov, invars, rparm, nreps, ana.obj, locs=NULL,
     locs.prior=NULL, tol=1e-10 )

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

  varcov: The result of ' make.varcov'

   rparm: Scalar or vector with 'nrow(varcov$var.x)' elements; the
          'ridge' parameters for the independent variables - larger
          values imply more shrinkage or a more concentrated prior for
          the regresion coefficients. 

   nreps: How many cycles of MCMC to perform

 ana.obj: A object produced by 'make.analysis.obj'

  invars: Which variables to start in the model. The first of these is
          immediately removed, so it is merely a placeholder.  The
          number of genes in the model is therefore 'k <-
          length(invars)'

    locs: The columns of 'varcov\$var.x' to use.  The default uses all
          of them.

locs.prior: The prior mass to associate with each variable.  Typically,
          these sum to one, but sometimes they might each be set to one
          (as in computing lod scores). 

     tol: Used in forming QR decomposition.  Let it be.

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

     An MCMC sampler for loci using the object of ' make.varcov ' is
     executed.  This sampler uses the exact posterior probability under
     the assumed correctness of the regression model using expected
     genotypes given marker values.  This amounts to linearizing the
     likelihood with respect to the  (possibly unknown) locus states. 
     For models where the loci are fully informative markers this is
     the true posterior.

     The chain is implemented as follows: given a set of regressor
     variables to start, one variable is removed, all regressor
     variables not in the model are examined to determine the effect of
     each on the posterior.  One variable is sampled.  The process is
     repeated until each variable has been removed and a new one
     sampled in its place (possibly the same variable that was removed
     is sampled).  And this whole cycle is repeated 'nreps' times.

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

     A list with components: 

  config: A k by k by nreps array of the locations sampled in each
          iteration. 

posteriors: A vector of length 'k*nreps' with the posteriors of the
          models.

   coefs: A k by k matrix of the regression coefficients.

    call: The call to 'swapbc1'

    cond: The 'k*nreps' posterior probabilities of the k-1 gene models.

    marg: The 'k*nreps' marginal posteriors for all k gene models that
          could be formed  using  the current k-1 gene model

alt.marginal: A vector with 'length(locs)' elements.  At each step, the
          posterior associated with  each candidate locus is added to
          an element of this vector.  After all steps are finished, the
          result is normalized to sum to one.  This turns out to be an
          exceedingly stable estimate of the marginal posterior. 

alt.coef: A vector with 'length(locs)' elements.  At each step, the
          product of each posterior times the coefficient associated
          with a candidate locus is  added to an element of this
          vector.  After all steps are finished, the result is
          normalized by the total marginal posterior.  This turns out
          to be an exceedingly stable estimate of the marginal (over
          all models) posterior mean of the regression coefficients. 

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

     Charles C. Berry cberry@ucsd.edu

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

     Berry C.C. (1998) Computationally Efficient Bayesian QTL Mapping
     in Experimental Crosses. _ASA Proceedings of the Biometrics
     Section,_ 164-169.

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

     'swapf2'

