Learn R Programming

gap (version 1.1-1)

LD22: LD statistics for two diallelic markers

Description

LD statistics for two SNPs.

It is possible to perform permutation test of $r^2$ by re-ordering the genotype through R's sample function, obtaining the haplotype frequencies by gc.em or genecounting, supplying the estimated haplotype frequencies to the current function and record x2, and comparing the observed x2 and that from the replicates.

Usage

LD22(h,n)

Arguments

h
a vector of haplotype frequencies
n
number of haplotypes

Value

  • The returned value is a list containing:
  • hthe original haplotype frequency vector
  • nthe number of haplotypes
  • Dthe linkage disequilibrium parameter
  • VarDthe variance of D
  • Dmaxthe maximum of D
  • VarDmaxthe variance of Dmax
  • Dprimethe scaled disequilibrium parameter
  • VarDprimethe variance of Dprime
  • x2the Chi-squared statistic
  • lorthe log(OR) statistic
  • vlorthe var[log(OR)] statistic

References

Zabetian CP, Buxbaum SG, Elston RC, Kohnke MD, Anderson GM, Gelernter J, Cubells JF. The structure of linkage disequilibrium at the DBH locus strongly influences the magnitude of association between diallelic markers and plasma dopamine beta-hydroxylase activity Am J Hum Genet 72: 1389-1400

Zapata C, Alvarez G, Carollo C (1997) Approximate variance of the standardized measure of gametic disequilibrium D'. Am. J. Hum. Genet. 61:771-774

See Also

LDkl

Examples

Run this code
h <- c(0.442356,0.291532,0.245794,0.020319)
n <- 481*2
t <- LD22(h,n)
t

Run the code above in your browser using DataLab