Learn R Programming

gap (version 1.6)

LD22: LD statistics for two diallelic markers

Description

LD statistics for two diallelic markers

Usage

LD22(h, n)

Value

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.

Arguments

h

a vector of haplotype frequencies.

n

number of haplotypes.

Author

Jing Hua Zhao

Details

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.

References

zabetian03gap

zapata97gap

See Also

LDkl

Examples

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

Run the code above in your browser using DataLab