hwelike | R Documentation |
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)
nvec |
A vector containing the observed genotype counts,
where |
thresh |
The threshold for ignoring the genotype. We keep
genotypes such that |
effdf |
A logical. Should we use the ad-hoc
"effective degrees of freedom" ( |
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.
David Gerard
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. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1534/g3.119.400132")}
thout <- hwefreq(alpha = 0.1, r = 0.3, ploidy = 6)
nvec <- c(stats::rmultinom(n = 1, size = 100, prob = thout))
hwelike(nvec = nvec)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.