rcpp_calc_Bhat: Estimate allele effects matrix, B hat, with Rcpp functions

Description Usage Arguments Value Examples

View source: R/rcpp_calc_Bhat.R

Description

Estimate allele effects matrix, B hat, with Rcpp functions

Usage

1
rcpp_calc_Bhat(X, Sigma_inv, Y)

Arguments

X

dn by df block-diagonal design matrix that incorporates genetic info for two markers. Note that we can use the same marker data twice.

Sigma_inv

dn by dn inverse covariance matrix, where its inverse, ie, Sigma, is often composed as K \otimes V_g + I_n \otimes V_e

Y

dn by 1 matrix, ie, a column vector, of d phenotypes' measurements

Value

a df by 1 matrix of GLS-estimated allele effects

Examples

1
2
3
4
5
X1 <- as.matrix(rbinom(n = 100, size = 1, prob = 1 / 2))
X <- gemma2::stagger_mats(X1, X1)
Sigma_inv <- diag(200)
Y <- runif(200)
rcpp_calc_Bhat(X = X, Sigma_inv = Sigma_inv, Y = Y)

qtl2pleio documentation built on Dec. 3, 2020, 1:06 a.m.