HWAIC | R Documentation |
Function HWAIC
calculates Akaike's Information Criterion for
ten different models that describe a bi-allelic genetic variant: M11:
Hardy-Weinberg proportions and equality of allele frequencies in the
sexes (HWP & EAF); M12: EAF and HWP in males only; M13: EAF and HWP in
females only; M14: EAF and equality of inbreeding coefficients in
the sexes (EIC); M15: EAF only; M21: HWP in both sexes; M22: HWP for
males only; M23: HWP for females only; M24: EIC only; M25: None of the previous.
HWAIC(x, y, tracing = 0, tol = 0.000001)
x |
Male genotype counts (AA,AB,BB) |
y |
Female genotype counts (AA,AB,BB) |
tracing |
Activate tracing in the maximization of some likelihoods (0=no tracing; 1:tracing) |
tol |
tolerance for iterative maximization of some likelihoods |
The log-likelihood for the six models is calculated. For two models (C
and E) this is done numerically using package RSolnp
.
A named vector containing 6 values for AIC
Jan Graffelman jan.graffelman@upc.edu
Graffelman, J. and Weir, B.S. (2018) On the testing of Hardy-Weinberg proportions and equality of allele frequencies in males and females at bi-allelic genetic markers. Genetic Epidemiology 42(1) pp. 34-48. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1002/gepi.22079")}
HWLRtest
males <- c(AA=11,AB=32,BB=13)
females <- c(AA=14,AB=23,BB=11)
stats <- HWAIC(males,females)
print(stats)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.