hwe.hardy {gap}R Documentation

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:

p Monte Carlo p value
se standard error of Monte Carlo p value
swp percentage of switches (partial, full and altogether)

References

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

Note

Adapted from HARDY, testable with -Dexecutable as standalone program

Author(s)

Sun-Wei Guo, Jing hua Zhao

Source

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

See Also

hwe

Examples

## Not run: 
# 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)
## End(Not run)

[Package Contents]