hwde                  package:hwde                  R Documentation

_F_i_t _r_e_l_e_v_a_n_t _m_o_d_e_l_s, _a_n_d _t_e_s_t _f_o_r _v_a_r_i_o_u_s _t_y_p_e_s _o_f _d_e_p_a_r_t_u_r_e _f_r_o_m
_H_a_r_d_y-_W_e_i_n_b_e_r_g _e_q_u_i_l_i_b_r_i_u_m.  _A_l_l_o_w_s _o_n_l_y _2 _a_l_l_e_l_e_s _p_e_r _l_o_c_u_s.  _T_h_e
_n_u_m_b_e_r _o_f _l_o_c_i _i_s _a_r_b_i_t_r_a_r_y.

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

     Fits models for genotypic disequilibria, as described in Huttley
     and Wilson (2000), Weir (1996) and Weir and Wilson (1986).

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

     hwde(data = IndianIrish, gp = "Population", termlist = NULL, refmodel = NULL, loci = paste("locus", 1:(dim(data)[2] - 1), sep = ""), observed = "Observed", keep.models = FALSE, aovtable.print = TRUE, group.terms = TRUE, allele.chars = letters)

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

    data: Must have a column of frequencies, by default called
          'Observed', and one or more columns giving genotype
          information, in the form AA, Aa, aa. or e.g., MM, MN, NN. 
          (The choice of letters is arbitrary.)  Additionally, there
          may be a column that gives information on groupings, by
          default called 'Population'. 

      gp: Gives the name of the column, if any, that has information on
          groups within the data.

termlist: Use to specify a user-defined sequence of models. See the
          vignette *hwde.pdf* or *hwde.html*

refmodel: For each model in 'termlist', specifies a reference model,
          which will be updated to include the additional terms.

    loci: Gives name(s) of columns that hold information on genotypes.
          By default, these are taken to be 'locus1', 'locus2', etc.

observed: Name (by default 'Observed') of the column that holds the
          frequenceies.

keep.models: Should a list be returned that holds the full sequence of
          models that were fitted?

aovtable.print: Should the anova table be printed?

group.terms: Should model terms be grouped according to hierarchy, for
          the anova table?

allele.chars: A sequence of letters used to code for the loci. By
          default \em{a}, \em{b}, \em{c}, ... are used

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

     See the document *hwde.pdf* or *hwde.html* for details. See the
     references (below) for information on the interpretation of model
     parameters.

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

anovatab: anova (analysis of deviance) table

 data.df: Data, and contrasts used in fitting the various models.

aovtab.terms: This string holds, for each model that is fitted. the
          terms that have appeared in the model formula. The text
          strings for the distinct models are concatenated.

  models: Optionally, this holds the complete sequence of qmodel
          objects that were fitted

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

     J.H. Maindonald

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

     1. Huttley, G.A. and Wilson, S.R. 2000. Testing for concordant
     equilibria between population samples. _Genetics_ *156*:2127-2135. 
      2. Weir, B.S. 1996.  \em{Genetic Data Analysis II.} Sinauer.
      3. Weir, B.S. and Wilson, S.R. 1986.  Log-linear models for
     linked loci. \em{Biometrics} *42*:665-670.

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

     'make.contrasts', 'decode.genotypes'

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

     data(IndianIrish)
     hwde(data=IndianIrish)
     data(mendelABC)
     hwde(data=mendelABC, loci=c("seedshape", "cotylcolor", "coatcolor"))

