HWadmiX: Carries out likelihood ratio test and chi-squared test for...

Description Usage Arguments Value Examples

Description

Carries out likelihood ratio test and chi-squared test for Hardy-Weinberg equilibrium for X chromosomal markers, accounting for the possibility of sex-biased admixture

Usage

1

Arguments

X

a named vector containing the genotype counts (names should be AA, AB, BB, A, B)

Value

list with the following elements:

lrt_pval: the p-value of the LRT test

prev_p_f, prev_p_m: the ML estimates of the previous generation allele frequencies in females and males

F_ic: the ML estimate of the inbreeding coefficient

current_p_f, current_p_m: estimates of the current generation allele frequencies in females and males, based on the ML estimates of the previous generation allele frequencies and of the inbreeding coefficient

current_p_AA, current_p_AB, current_p_BB: estimates of the current generation genotype frequencies in females, based on the ML estimates of the previous generation allele frequencies and of the inbreeding coefficient

cs_ml_pval: the p-value of the chi-squared (maximum likelihood) test

you_lrt0_unconstrained_pval: the p-value of the LRT0 test from X.-P. You, Q.-L. Zou, J.-L. Li and J.-Y. Zhou, Likelihood ratio test for excess homozygosity at marker loci on X chromosome. LRT0 test, PLoS One 2015; 10(12): e0145032, where the inbreeding coefficient is not constrained to be in [0,1]

Examples

1
2
snp <- c(A = 122, B = 278, AA = 88, AB = 242, BB = 70)
HWadmiX(snp)

dbackenroth/HWadmiX documentation built on May 16, 2019, 9:14 a.m.