Learn R Programming

HWEBayes (version 1.4)

HWEmodelsMLE: Evaluates the maximum likelihood estimates of the parameters of various models in the k allele case

Description

Function to obtain the MLEs of parameters under the HWE, single $f$ and saturated models. For the single $f$ model numerical maximization is required if $k>2$, where $k$ is the number of alleles.

Usage

HWEmodelsMLE(nvec)

Arguments

nvec
vector of genotype frequencies in the order $n_{11}, n_{21}, n_{22}, ..., n_{k1}, n_{k2}, ..., n_{kk}$.

Value

  • phatmatrix of $k \times k$ MLEs of genotype frequencies
  • qhatMLEs of $k$ allele frequencies under the HWE model
  • fqhatMLEs of $k$ allele frequencies under the single $f$ model
  • fsingleMLE of single $f$
  • fmaxloglikmaximized log-likelihood (without the normalizing constant), under the single $f$ model
  • fminestimated lower bound of $f_{\min}$ in the single $f$ model. Under the single $f$ model $f_{\min} < f <1$ where="" $f_{\min}="-p_{\min}/(1-p_{\min})$" and="" $p_{\min}$="" is="" the="" minimum="" of="" allele="" frequencies.<="" description="">

References

Wakefield, J. (2010). Bayesian methods for examining Hardy-Weinberg equilibrium. Biometrics; Vol 66:257-65

Weir, B.S. (1996). Genetic Data Analysis II. Sunderland MA: Sinauer.

Examples

Run this code
data(DiabRecess)
HWEmodelsMLE(nvec=DiabRecess)

Run the code above in your browser using DataLab