bqtl                  package:bqtl                  R Documentation

_B_a_y_e_s_i_a_n _Q_T_L _M_o_d_e_l _F_i_t_t_i_n_g

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

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

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

     bqtl(reg.formula, ana.obj, ...)

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

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

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

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

     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'

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

     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'

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

     Charles C. Berry cberry@ucsd.edu

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

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

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

     'locus', 'configs', 'lapadj'

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

     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)

