Unified dispatcher. With method = "r2" (default and recommended
for large datasets) it calls the C++ Armadillo back-end for fast standard
squared Pearson correlations. With method = "rV2" it applies kinship
whitening first and then the same C++ correlation kernel.
Usage
compute_ld(X, method = c("r2", "rV2"), digits = -1L, n_threads = 1L)Arguments
- X
NumericMatrix (individuals x SNPs). For
method = "r2": raw or mean-centred genotypes (0/1/2). Formethod = "rV2": the pre-whitened matrix \(V^{-1/2} \tilde{G}\) produced byprepare_geno().- method
Character.
"r2"(default) or"rV2".- digits
Integer. Rounding precision.
-1skips rounding.- n_threads
Integer. OpenMP threads for the C++ kernel. Default 1. Use
parallel::detectCores()to choose automatically.
See also
compute_r2, compute_rV2,
prepare_geno, Big_LD()