twohk                  package:bqtl                  R Documentation

_O_n_e _a_n_d _T_w_o _G_e_n_e _M_o_d_e_l_s _U_s_i_n_g _L_i_n_e_a_r_i_z_e_d _P_o_s_t_e_r_i_o_r

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

     Fits all one and two gene models (without interactions aka
     'epistasis') in an intercross, backcross, or recombinant inbred
     line. Uses a linear approximation to the likelihood, i.e. the
     expected allele states are used.

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

     twohk(varcov, ana.obj, ...)

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

  varcov: An object produced by ' make.varcov' 

 ana.obj: An 'analysis.object' - see 'make.analysis.obj' 

     ...: Additional arguments override the default choices of
          candidate loci ('locs'), prior for locus ('locs.prior'), or
          method specified by 'ana.obj': 'locs'{A vector indexing the
          loci to use.} 'locs.prior'{  The prior mass to  associate
          with each locus. Typically, these sum to one, but sometimes
          they might each be set to one (as in computing lod scores). }
          'combo.prior'{Only valid for 'ana.obj$method=="F2"'.  The
          prior probability for each term or combination of terms for
          the phenotypic effect at a locus. Typically, there will be
          three of these - one for the 'additive' term (linear in
          number of alleles from one parent strain), the 'dominance'
          term (quadratic in allele number), or both terms. The default
          sets them all to 1/3.} 

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

     The marginal posterior (integrating over regression parameters and
     dispersion) is calculated for each one and two gene model 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.

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

     A list with components: 

   loc.1: The marginal posterior for each one gene model relative to a
          no gene model.  For 'twohkf2' this is a matrix of 3 columns;
          the first for models with additive terms, the second for
          dominance terms, and the third for both. The sum over all
          three columns yields the marginal posterior for the locus.

   loc.2: The marginal posterior for each locus - obtained by summing
          over all two gene models that include that locus-  relative
          to a no gene model. For 'twohkf2' this is a matrix of 3
          columns; the first for models with additive terms, the second
          for dominance terms, and the third for both. 

 coefs.1: The regression coefficients for the genetic effect for  each
          locus. For 'twohkf2', this is a matrix with two rows; the
          first is for the 'additive effect' and the second is for the
          'dominance' effect.

 coefs.2: The marginal posterior mean of regression coefficients for
          the genetic effect for each locus - obtained by averaging
          over all two gene models that include that locus according to
          the posterior masses. For 'twohkf2', this is a matrix with
          two rows; the first is for the 'additive effect' and the
          second is for the 'dominance' effect.

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

     Charles C. Berry cberry@ucsd.edu

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

     Haley C.S. and Knott S.A. (1992) A simple regression method for
     mapping quantitative trait loci in line crosses using flanking
     markers. _Heredity_ *69*,315-324.

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

     data(little.ana.bc)
     little.vc<-make.varcov(little.ana.bc$data[,little.ana.bc$reg.names],
       little.ana.bc$data$bc.phenotype)
     little.2<- twohk(little.vc,little.ana.bc,rparm=1)
     print( c(odds.1=sum(little.2$loc.1),odds.2=sum(little.2$loc.2)) )
     par(mfrow=c(3,2))
     little.pe <- 2 * little.2$loc.2 / sum(little.2$loc.2)   #locus-wise posterior expectation
     plot(little.ana.bc,little.pe,type="h",ylab="E(genes")
     rm(little.2,little.vc,little.pe,little.ana.bc)

