HWData {HardyWeinberg}R Documentation

Generating marker data in Hardy-Weinberg Equilibrium

Description

HWData takes samples from the multinomial distribution given Hardy-Weinberg allele frequencies.

Usage

HWData(n = 100, nm = 100, pfixed = NULL, exactequilibrium = FALSE, pdist
= "runif",...)

Arguments

n the sample size.
nm the number of markers (or samples).
pfixed take a fixed allele frequency with value pfixed.
exactequilibrium generate data in exact HWE or use the multinomial distribution
pdist take a random allele frequency from a uniform or beta distribution.
... specific parameters for the uniform or beta

Value

Xt the genotypic counts.
Xc the genotypic compositions.

Author(s)

Jan Graffelman (jan.graffelman@upc.edu)

See Also

HWTernaryPlot

Examples

n <- 100
nm <- 100
out <- HWData(n,nm)

[Package HardyWeinberg version 1.3 Index]