matrixQTL_one_dim: Solve Y = Xb + e in matrix form

Description Usage Arguments Value Examples

View source: R/rlib_matrix_ls.R

Description

For each column i in X, solve Y_k = X_i b_i + e as least squares problem and output estimated effect size and standard deviation

Usage

1

Arguments

Y

response to regress against (dimension = N x K)

X

P predictors to perform regression separately (dimension = N x P)

n

sample size (dimension = P x K)

Value

a list of summary statistics beta_hat: estimated b, b_hat (dimension = K x P) beta_se: standard deviation of b_hat (dimension = K x P)

Examples

1
2
3
4
5
matrixQTL_one_dim(
  Y = matrix(rnorm(300), ncol = 3),
  X = matrix(sample(c(0, 0.5, 1), 200, replace = TRUE), ncol = 2),
  n = matrix(100, ncol = 2, nrow = 3)
)

liangyy/mixqtl documentation built on Sept. 17, 2020, 11:36 a.m.