Fits models for genotypic disequilibria, as described in Huttley and Wilson (2000), Weir (1996) and Weir and Wilson (1986).
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)
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 |
See the document hwde.pdf or hwde.html for details. See the references (below) for information on the interpretation of model parameters.
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.
|
references{
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.
}
author{J.H. Maindonald}
seealso{make.contrasts, identify.genotypes }
examples{
data(IndianIrish)
hwde(data=IndianIrish}
data(mendel3)
hwde(data=mendel3
J.H. Maindonald
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.
make.contrasts, identify.genotypes
data(IndianIrish) hwde(data=IndianIrish