HWEsimdat: Simulate data under the single f model with k alleles.

Description Usage Arguments Value Author(s) References Examples

Description

Simulate data under the single f model with k alleles (so f=0 gives data under HWE).

Usage

1
HWEsimdat(npop, q, f)

Arguments

npop

population size.

q

vector of k allele frequencies.

f

value of inbreeding coefficient

Value

nvec

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

Author(s)

Jon Wakefield (jonno@u.washington.edu)

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

1
counts <- HWEsimdat(100,q=c(0.1,0.8,.1),f=0.1)

HWEBayes documentation built on May 2, 2019, 11:07 a.m.

Related to HWEsimdat in HWEBayes...