swapbc1 {bqtl}R Documentation

Sample BC1 or Recombinant Inbred loci via approximate posterior.

Description

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.

Usage

swapbc1(varcov, invars, rparm, nreps, locs=seq(ncol(var.x)),
locs.prior=rep(1, ncol(var.x)),tol=1e-10 )

Arguments

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.
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.

Value

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.

Author(s)

Charles C. Berry cberry@ucsd.edu

References

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

See Also

swapf2