Learn R Programming

HardyWeinberg (version 1.7.8)

AFtest: Exact test of equality of allele frequencies for males and females

Description

Function AFtest tests equality of allele frequencies for males and females for bi-allelic marker data by means of a Fisher exact test.

Usage

AFtest(x, verbose = TRUE, ...)

Value

AC

Two-way table of sex by allele

pval

p-value of the test

Arguments

x

a vector containg the genotypic counts c(A,B,AA,AB,BB) for a bi-allelic X-chromosomal markers.

verbose

verbose = TRUE prints results, verbose = FALSE is silent.

...

additional arguments for function fisher.test.

Author

Jan Graffelman jan.graffelman@upc.edu

Details

Function AFtest constructs the contingency table of sex by allele, and call fisher.test to test for equality of allele frequencies. The test assumes Hardy-Weinberg equilibrium.

See Also

HWChisq, HWExact

Examples

Run this code
  rs5968922 <-  c(A=392, B=212, AA=275, AB=296, BB=80)
  AFtest(rs5968922)

Run the code above in your browser using DataLab