hweustat: U-process minimizer approach to equilibrium testing and double reduction
estimation
Description
Estimates double reduction and tests for equilibrium while accounting
for double reduction. It does this using an approach called
"U-process minimization", where we minimize a function of a U-statistic
that should be 0 at equilibrium given the true double reduction rate.
Usage
hweustat(nvec, thresh = NULL, effdf = TRUE)
Value
A list with some or all of the following elements:
alpha
The estimated double reduction parameter(s).
In diploids, this value is NULL.
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.
Arguments
nvec
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.
thresh
The threshold for ignoring the genotype. We keep
genotypes such that nvec >= thresh.
Setting this to 0 uses all genotypes. Setting this to
NULL uses a heuristic that works well in practice.
effdf
A logical. Should we use the ad-hoc
"effective degrees of freedom" (TRUE) or not (FALSE)?
Author
David Gerard
Details
This is a two-step estimator, where we first obtain a consistent
estimate of the double reduction parameter, use this to
estimate the covariance of estimators, then use this to obtain
our final estimate of the double reduction parameter.