-
Notifications
You must be signed in to change notification settings - Fork 1
/
rcpp_calc_Bhat2.Rd
28 lines (26 loc) · 941 Bytes
/
rcpp_calc_Bhat2.Rd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/rcpp_calc_Bhat.R
\name{rcpp_calc_Bhat2}
\alias{rcpp_calc_Bhat2}
\title{Estimate allele effects matrix, B hat, with Rcpp functions}
\usage{
rcpp_calc_Bhat2(X, Y, Sigma_inv)
}
\arguments{
\item{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.}
\item{Y}{dn by 1 matrix, ie, a column vector, of d phenotypes' measurements}
\item{Sigma_inv}{dn by dn inverse covariance matrix, often composed as inverse of \eqn{K \otimes V_g + I_n \otimes V_g}}
}
\value{
a df by 1 matrix of GLS-estimated allele effects
}
\description{
Estimate allele effects matrix, B hat, with Rcpp functions
}
\examples{
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_Bhat2(X = X, Y = Y, Sigma_inv = Sigma_inv)
}