R/theo.R
hwelike.Rd
Genotype frequencies from Huang et al (2019) are used to implement a likelihood procedure to estimate double reduction rates and to test for equilibrium while accounting for double reduction. This approach is only implemented for ploidies 4, 6, 8, and 10.
hwelike(nvec, thresh = 5, effdf = FALSE)
A vector containing the observed genotype counts,
where nvec[[i]]
is the number of individuals with genotype
i-1
. This should be of length ploidy+1
.
The threshold for ignoring the genotype. We keep
genotypes such that nvec >= thresh
.
Setting this to 0
uses all genotypes.
A logical. Should we use the ad-hoc
"effective degrees of freedom" (TRUE
) or not (FALSE
)?
A list with some or all of the following elements:
alpha
The estimated double reduction parameter(s).
In diploids, this value is NULL
.
r
The estimated allele frequency.
chisq_hwe
The chi-square test statistic for testing against the null of equilibrium.
df_hwe
The degrees of freedom associated with
chisq_hwe
.
p_hwe
The p-value against the null of equilibrium.
Huang, K., Wang, T., Dunn, D. W., Zhang, P., Cao, X., Liu, R., & Li, B. (2019). Genotypic frequencies at equilibrium for polysomic inheritance under double-reduction. G3: Genes, Genomes, Genetics, 9(5), 1693-1706. doi:10.1534/g3.119.400132