Learn R Programming

LDtests (version 1.0)

LDtests-package: Exact tests for Linkage Disequilibrium and Hardy-Weinberg Equilibrium

Description

Exact tests for Linkage Disequilibrium (LD) and Hardy-Weinberg Equilibrium (HWE). - 2-sided LD tests based on different measures of LD (Kulinskaya and Lewin 2008) - 1-sided Fisher's exact test for LD - 2-sided Haldane test for HWE (Wiggington 2005) - 1-sided test for inbreeding - conditional p-values proposed in Kulinskaya (2008) to overcome the problems of asymetric distributions (for both LD and HWE)

Arguments

Details

Package:
LDtests
Type:
Package
Version:
1.0
Date:
2008-06-07
License:
GPL
LD2sided.pvals calculates LD p-values for the input table Fisher1sided calculates Fisher's 1-sided p-values for LD for the input table HWE2sided calculates HWE p-values for the input table LD2sided.tables calculates LD p-values for an entire null distribution HWE2sided.table calculates HWE p-values for an entire null distribution

References

Kulinskaya and Lewin 2008

Examples

Run this code
ctable <- c(4,5,1,20)
LD2sided.tables(ctable)
LD2sided.pvals(ctable)$pval.Fish
Fisher1sided(ctable)$pval.Fish 
HWE2sided.table(maf=0.17,n=100)
geno <- c(20,73,7)
HWE2sided(geno)

Run the code above in your browser using DataLab