make.contrasts {hwde} | R Documentation |
Calculate contrasts required by the function
Description
Calculates the contrasts that hwde
uses in fitting models
for genotypic disequilibrium. At present these are limited to
first order interaction terms between the distinct loci,
possibly with distinct values foe each different level of a
grouping factor.
Usage
make.contrasts(data = data[, loci], allele.chars = letters)
Arguments
data |
Data frame, with one column per locus, and as many rows as there are observations. Genotypes are represented using a two-letter code, e.g., AA, Aa, aa |
allele.chars |
By default the letters "a", "b", ..., one for each locus, are used. |
Details
Any pair of letters can be used for the two alleles. The setting
of allele.chars
determines the coding used in the model
formulae. This function is called by hwde
Value
contrasts.df |
Data frame whose columns hold the contrasts that will be explanatory variables for the Poisson regression model. |
oset |
Offset vector for the GLM model. |
list.columns |
List in which each element is a text string that holds the codes for a sequence of model terms. |
Author(s)
J.H. Maindonald
See Also
identify.genotypes
, called by make.contrasts
Examples
make.contrasts(data=c("AA","Aa","aa"))