Learn R Programming

bqtl (version 1.0-29)

linear.bayes: Bayesian QTL mapping via Linearized Likelihood

Description

The Bayesian QTL models via a likelihood that is linearized w.r.t. a fixed genetic model. By default, all one and two gene models (without epistasis) are fitted and a MCMC sampler is used to fit 3,4, and 5 gene and (optionally) larger models.

Usage

linear.bayes(x, ana.obj, partial=NULL, rparm, specs,
scope, subset, casewt, ...)

Arguments

x
a formula giving the QTL and the candidate loci or a varcov object
ana.obj
An analysis.object, see make.analysis.obj
partial
a formula giving covariates to be controlled
rparm
A ridge parameter. A value of 1 is suggested, but the default is 0.
specs
An optional list with components gene.number (to indicate the model sizes), burn.in (to indicate the number of initial MCMC cycles to discard), and n.cycles (to indicate how many MCMC cycles to perform for each
scope
Not generally used. If supplied this will be passed to varcov.
subset
Not generally used. If supplied this will be passed to varcov.
casewt
Not generally used. If supplied this will be passed to varcov.
...
optional arguments to pass to twohk and swap

Value

  • hkThe object returned by twohk
  • swapsA list of objects returned by calls to swap. Element i in swaps is for i gene models.
  • smryA list of objects returned by calls to summary.swap. Some elements may be NULL if no samples were requested or if the sampling process yielded degenerate results. Usually, this happens if no posterior is specified for the regression coefficients, i.e. if rparm=0 was used or implied
  • oddsA Vector of odds (relative to a no gene setup) for each model size evaluated. The odds are computed under a prior that places equal weights on models of each size considered (and are, therefore, Bayes Factors). If models of size 1 and 2 are not evaluated or if some degenerate results were encountered, this will be NULL
  • coefsA vector of posterior means of the regression coefficients. If models of size 1 and 2 are not evaluated or if some degenerate results were encountered, this will be NULL
  • loc.posteriorA vector of locus-wise posterior probabilities that the interval covered by this locus contains a gene.If models of size 1 and 2 are not evaluated or if some degenerate results were encountered, this will be NULL
  • callThe call that generated this object

Details

This function is a wrapper for varcov, twohk, swap, and summary.swap, and a better understanding of optional arguments and the object generated is gained from their documentation.

References

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

Examples

Run this code
data( little.ana.bc )
little.lin <- linear.bayes( bc.phenotype~locus(all), little.ana.bc, rparm=1 )
par(mfrow=c(2,3))
plot( little.ana.bc, little.lin$loc.posterior, type="h" )
little.lin$odds
par(mfrow=c(1,1))
plot(fitted(little.lin), residuals(little.lin))
<testonly>rm(little.lin,little.ana.bc)</testonly>

Run the code above in your browser using DataLab