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.

1 | ```
LD22(h,n)
``` |

`h` |
a vector of haplotype frequencies |

`n` |
number of haplotypes |

The returned value is a list containing:

`h` |
the original haplotype frequency vector |

`n` |
the number of haplotypes |

`D` |
the linkage disequilibrium parameter |

`VarD` |
the variance of D |

`Dmax` |
the maximum of D |

`VarDmax` |
the variance of Dmax |

`Dprime` |
the scaled disequilibrium parameter |

`VarDprime` |
the variance of Dprime |

`x2` |
the Chi-squared statistic |

`lor` |
the log(OR) statistic |

`vlor` |
the var[log(OR)] statistic |

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

extracted from 2ld.c

Jing Hua Zhao

`LDkl`

1 2 3 4 5 6 7 |

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

All documentation is copyright its authors; we didn't write any of that.