Tests for each row of a matrix whether the Hardy-Weinberg Equilibrium holds for the SNP represented by the row.
rowHWEs(x, levels = 1:3, affy = FALSE, check = TRUE)
a matrix in which each row represents a SNP and each column a subject,
where the SNPs can take the values specified by levels
. NAs are allowed.
a vector of length three specifying the values with which the three
genotypes of each SNP are represented. It is assumed that the second element of
levels
represents the heterozygous genotype, whereas the first and the
third element represent the homozygous genotypes. Ignored if affy = TRUE
.
logical specifying whether the SNPs in x
are coded as in the Affymetrix
standard output. If TRUE
, levels = c("AA", "AB", "BB")
will be used.
should some checks be done if, e.g., other than the specified levels
are used in x
? It is highly recommended to leave check = TRUE
. Setting
check = FALSE
will reduce the computation time slightly.
A list containing the values of the ChiSquare statistic for testing for deviation from HWE
(stats
) and the raw p-values (rawp
) computed by employing the ChiSquare distribution
with 1 degree of freedom.