bqtl: Bayesian QTL Model Fitting

bqtlR Documentation

Bayesian QTL Model Fitting

Description

Find maximum likelihood estimate(s) or posterior mode(s) for QTL model(s). Use Laplace approximation to determine the posterior mass associated with the model(s).

Usage


bqtl(reg.formula, ana.obj, scope = ana.obj$reg.names, expand.specials = NULL, ...)

Arguments

reg.formula

A formula.object like y ~ add.PVV4 * add.H15C12 . The names of the independent variables on the right hand side of the formula are the names of loci or the names of additive and dominance terms associated with loci. In addition, one can use locus or configs terms to specify one or a collection of terms in a shorthand notation. See locus for more details. The left hand side is the name of a trait variable stored in the search path, as a column of the data frame data, or y if the phenotype variable in ana.obj is used.

ana.obj

The result of make.analysis.obj .

scope

passed to lapadj

expand.specials

passed to lapadj

...

Arguments to pass to lapadj, e.g. rparm and return.hess

Details

This function is a wrapper for lapadj. It does a lot of useful packaging through the configs terms. If there is no configs term, then the result is simply the output of lapadj with the call attribute replaced by the call to bqtl

Value

The result(s) of calling lapadj. If configs is used in the reg.formula, then the result is a list with one element for each formula. Each element is the value returned by lapadj

Author(s)

Charles C. Berry cberry@ucsd.edu

References

Tierney L. and Kadane J.B. (1986) Accurate Approximations for Posterior Moments and Marginal Densities. JASA, 81,82–86.

See Also

locus, configs, lapadj

Examples


data(little.ana.bc )                        # load  BC1 dataset

loglik( bqtl( bc.phenotype ~ 1, little.ana.bc ) ) #null loglikelihood
                                                  #on chr 1 near cM 25
loglik(bqtl(bc.phenotype~locus(chromo=1,cM=25),little.ana.bc))

little.bqtl <-                              # two genes with epistasis
   bqtl(bc.phenotype ~ m.12 * m.24, little.ana.bc)
summary(little.bqtl)

several.epi <-                              # 20 epistatic models
    bqtl( bc.phenotype ~ m.12 * locus(31:50), little.ana.bc)
several.main <-                             # main effects only
    bqtl( bc.phenotype ~ m.12 + locus(31:50), little.ana.bc)

max.loglik <- max( loglik(several.epi) - loglik(several.main) )

round(
     c( Chi.Square=2*max.loglik, df=1, p.value=1-pchisq(2*max.loglik,1))
      ,2)

five.gene <-                                 ## a five gene model
  bqtl( bc.phenotype ~ locus( 12, 32, 44, 22, 76 ), little.ana.bc , return.hess=TRUE )

regr.coef.table <- summary(five.gene)$coefficients

round( regr.coef.table[,"Value"] +  # coefs inside 95% CI
          qnorm(0.025) * regr.coef.table[,"Std.Err"] %o%
            c("Lower CI"=1,"Estimate"=0,"Upper CI"=-1),3)




bqtl documentation built on Sept. 25, 2024, 1:08 a.m.

Related to bqtl in bqtl...