mergematrices             package:happy             R Documentation

_C_o_n_s_t_r_u_c_t _m_a_t_r_i_c_e_s _u_s_e_d _t_o _m_e_r_g_e _t_o_g_e_t_h_e_r _f_o_u_n_d_e_r _s_t_r_a_i_n_s

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

     mergematrices() creates a list containing two matrices suitable
     for pre-multiplying with an additive or full  happy marker design
     matrix, in order to produce matrices with certain columns
     combined. These reduced matrices are used to test whether the
     specified merge reduces the significance of the fit. This function
     is not usually called directly but is used by mergfit() and hfit()
     megedpositionmatrix() will return either the merged design matrix
     or the mergematrices object corresponding to an object returned by
     mergeprepare()

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

      mergematrices( strains, mergelist=NULL, verbose=FALSE )
      mergedpositionmatrix( h, position, prepmerge, model='additive',
     verbose=FALSE, design=TRUE )

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

 strains: character array of strain names

mergelist: a list of lists of strains describing how the strains are
          grouped together. For instance 'mergelist <- list(
          A=list('AJ', 'BALB', 'AKR'), T=list('RIII','I', 'DBA', 'C57',
          'C3H') )' divides the strains into two groups corresponding
          to the alleles A, T (the allele names are not important). It
          is essential that the all strain names match all the values
          in strains.

 verbose: switch to determine whether to tell what is happening.

       h: an object returned by a previous call to happy() 

position: the coordinate of the polymorphism to be tested, ie an entry
          in prepmerge$testmarkerdata$POSITION

prepmerge: an object returned by mergeprepare()

   model: the type of model to be fitted - 'additive' or 'full'

  design: switch to make mergepositionmatrix return the mergematrix
          object rather than the merged design matrix

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

     mergematrices() and mergepositionmatrix() return an object
     comprising a list with two elements:

    amat: the matrix to apply to an additive-model design matrix

    imat: the matrix to apply to a full-model (interaction) design
          matrix


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

     Richard Mott

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

     happy(), mergefit(), hfit(), mergelist()

