Learn R Programming

gap (version 0.8-2)

hwe.hardy: Hardy-Weinberg equlibrium test using MCMC

Description

Hardy-Weinberg equilibrium test by MCMC

Usage

hwe.hardy(a,alleles=3,seed=3000,sample=c(1000,1000,5000))

Arguments

a
a trangular array containing the genotype
alleles
number of allele at the locus, greater than or equal to 3
seed
pseudo-random number seed
sample
optional, parameters for MCMC containing # of chunks, size of chunk and burn-in steps

Value

  • The returned value is a list containing:
  • pMonte Carlo p value
  • sestandard error of Monte Carlo p value
  • swppercentage of switches (partial, full and altogether)

source

http://www.stat.washington.edu/thompson/Genepi/pangaea.shtml,

References

Guo, S.-W. and E. A. Thompson (1992) Performing the exact test of Hardy-Weinberg proportion for multiple alleles. Biometrics. 48:361--372.

See Also

hwe

Examples

Run this code
# example 2 from hwe.doc:
a<-c(
3,
4, 2,
2, 2, 2,
3, 3, 2, 1,
0, 1, 0, 0, 0,
0, 0, 0, 0, 0, 1,
0, 0, 1, 0, 0, 0, 0,
0, 0, 0, 2, 1, 0, 0, 0)
ex2<-hwe.hardy(a,alleles=8)

Run the code above in your browser using DataLab