HWEsimdat {HWEBayes} | R Documentation |
Simulate data under the single f model with k alleles (so f=0 gives data under HWE).
HWEsimdat(npop, q, f)
npop |
population size. |
q |
vector of k allele frequencies. |
f |
value of inbreeding coefficient |
nvec |
vector of genotype counts, in the order n_{11}, n_{21}, n_{22}, ..., n_{k1}, n_{k2}, ..., n_{kk}. |
Jon Wakefield (jonno@u.washington.edu)
Wakefield, J. (2009). Bayesian methods for examining Hardy-Weinberg equilibrium. Biometrics.
Weir, B.S. (1996). Genetic Data Analysis II. Sunderland MA: Sinauer.
counts <- HWEsimdat(100,q=c(0.1,0.8,.1),f=0.1)