A (sparse) matrix for which the eigenvectors of its genomic relationship matrix are sought. The input matrix is assumed to be oriented to contain the data for one individual per column.
k
The number of leading eigenvectors.
useCpp
Flag to switch between R or C++ implementations. Default is useCpp=TRUE.
sparse
Flag to switch between purpose-built dense or sparse implementations. Default is sparse=TRUE.
robust
Flag to indicate if the classic (robust=FALSE) or robust (robust=TRUE) version of the genomic relationship matrix is desired. Default is robust=TRUE.
q
The number of power iteration steps (default is q=2).
Value
The k leading eigenvectors of the genomic relationship matrix of m as a column matrix.
References
Yang J, Lee SH, Goddard ME, Visscher PM (2011). GCTA: a tool for genome-wide complex trait analysis. Am J Hum Genet, 88(1):76-82.
N. Halko, P.G. Martinsson, and J.A. Tropp (2011). Finding Structure with Randomness: Probabilistic Algorithms for Constructing Approximate Matrix Decompositions. SIAM Review: 53(2), pp. 217--288.
# NOT RUN {require(locStra)
require(Matrix)
m <- matrix(sample(0:1,100,replace=TRUE),ncol=5)
sparseM <- Matrix(m,sparse=TRUE)
print(fastGrmEVs(sparseM,k=2,useCpp=FALSE))
# }