compute_ld: Compute two commonly used linkage disequilibrium statistics.

Description Usage Arguments Details Value Examples

Description

Compute R.squared and D.prime for two binary numeric vectors.

Usage

1
compute_ld(x, y)

Arguments

x

a numeric vector of ones and zeros

y

a numeric vector of ones and zeros

Details

Find more details here: https://en.wikipedia.org/wiki/Linkage_disequilibrium

Value

A list with two items:

R.squared

Squared Pearson correlation coefficient.

D.prime

Coefficient of linkage disequilibrium D divided by the theoretical maximum.

Examples

1
compute_ld(c(0,0,0,1,1,1), c(1,1,1,1,0,0))

slowkow/proxysnps documentation built on May 30, 2019, 3:06 a.m.