eigen_rotation: eigen decomposition + rotation

Description Usage Arguments Value Examples

View source: R/lmm.R

Description

Do eigen decomposition of kinship matrix and rotate X and y by that, i.e., pre-multiply by the transpose of the matrix of eigenvectors. If Kva and Kve_t provided, just do the "rotation".

Usage

1
2
eigen_rotation(K, y, X = NULL, Kva = NULL, Kve_t = NULL,
  use_cpp = TRUE)

Arguments

K

Kinship matrix (required if use_cpp=TRUE)

y

Phenotypes

X

Numeric matrix with covariates. If NULL, use a column of 1's (for intercept).

Kva

Eigenvalues of K (optional, ignored if use_cpp=TRUE)

Kve_t

= transposed eigenvectors of K (optional, ignored if use_cpp=TRUE)

use_cpp

= if TRUE, use c++ version of code

Value

List containing Kva, Kve_t and rotated y and X.

Examples

1
2
data(recla)
e <- eigen_rotation(recla$kinship, recla$pheno[,1], recla$covar)

kbroman/lmmlite documentation built on May 20, 2019, 8:12 a.m.