HWAIC: Compute Akaike's Information Criterion (AIC) for HWP and EAF...

View source: R/HWAIC.R

HWAICR Documentation

Compute Akaike's Information Criterion (AIC) for HWP and EAF models

Description

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.

Usage

HWAIC(x, y, tracing = 0, tol = 0.000001)

Arguments

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

Details

The log-likelihood for the six models is calculated. For two models (C and E) this is done numerically using package RSolnp.

Value

A named vector containing 6 values for AIC

Author(s)

Jan Graffelman jan.graffelman@upc.edu

References

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")}

See Also

HWLRtest

Examples

males <- c(AA=11,AB=32,BB=13) 
females <- c(AA=14,AB=23,BB=11) 
stats <- HWAIC(males,females)
print(stats)

HardyWeinberg documentation built on May 29, 2024, 6:17 a.m.