Description Usage Arguments Value Author(s) References See Also Examples

While `getLD`

computes the value of D' and r^2 for each pair of SNPs in a matrix,
`getLDlarge`

determines D' and r^2 between each SNP and a user-specified number of SNPs
closest to the SNP on the corresponding chromosome. Thus, `getLDlarge`

can be applied
to much more SNPs than `getLD`

.

1 2 3 4 5 |

`x` |
a numeric matrix consisting of 0, 1, and 2, where it is assumed that
the values represent the numbers of minor alleles that the SNPs show. Missing values
are allowed. By default, each column represents a SNP and each row a subject.
This can be changed by setting |

`neighbors` |
positive integer specifying the number of neighbors of a SNP (in both directions) on a chromosome
for which D' or r^2 should be computed. Thus, for each SNP (except for the SNPs in the first and last |

`which` |
which LD measures should be computed? Either |

`parentsOnly` |
logical indicating whether only the genotypes of the parents, i.e.\ rows 1, 2,
4, 5, ... of |

`iter` |
integer specifying how many iterations are used in the procedure of Hill (1974) which is used to estimate D. |

`snp.in.col` |
logical indicating whether each column of |

`asMatrix` |
logical indicating whether the LD values are returned as a |

`addVarN` |
logical indicating whether for each pair of SNPs the number of non-missing values
and the variance estimates of D' proposed by Zabaleta et al. (1997) should be added to the output. The
variance estimates are required for the identification of LD-blocks with |

An object of class `getLD`

or `getLDlarge`

consisting (depending of the specification of `which`

) the
D' (`Dprime`

) or r^2 (`rSquare`

) values for each SNP pair, and (depending of the specification
of `addVarN`

) the variance estimates for D' (`varDprime`

) and the numbers of non-missing values
(`n`

). Furthermore, the names of the SNPs (`rn`

) will be added (in `getLD`

, if `asMatrix = FALSE`

).

Holger Schwender, holger.schwender@udo.edu

Hill, W.O. (1974). Estimation of Linkage Disequilibrium in Randomly Mating Populations.
*Heredity*, 33, 229-239.

Zapata, C., Alvarez, G., and Carollo, C. (1997). Approximate Variance of the Standardized Measure of Gametic
Disequilibrium D'. *American Journal of Human Genetics*, 61, 771-774.

1 2 3 4 5 6 7 8 9 10 | ```
# Load the simulated data.
data(trio.data)
# The values of Dprime and Rsquare for each pair of SNPs
# in LDdata can be computed by
ld.out <- getLD(LDdata)
# By default, the LD measures are returned as a vector.
# If they should be returned as a matrix, then use
ld.out2 <- getLD(LDdata, asMatrix = TRUE)
``` |

```
```

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.