CoMM to dissecting genetic contributions to complex traits by leveraging regulatory information.

lmm_pxem2(y, w, x, maxIter)

Arguments

y

gene expression vector.

w

covariates file for eQTL data.

x

normalized genotype (cis-SNPs) matrix for eQTL.

maxIter

maximum iteration (default is 1000).

Value

List of model parameters

Details

lmm_pxem2 fits the linear mixed model (n > p).

Author

Jin Liu, jin.liu@duke-nus.edu.sg

Examples

L = 1; M = 100; rho =0.5 n1 = 350; n2 = 5000; X <- matrix(rnorm((n1+n2)*M),nrow=n1+n2,ncol=M); beta_prop = 0.2; b = numeric(M); m = M * beta_prop; b[sample(M,m)] = rnorm(m); h2y = 0.05; b0 = 6; y0 <- X%*%b + b0; y <- y0 + (as.vector(var(y0)*(1-h2y)/h2y))^0.5*rnorm(n1+n2); h2 = 0.001; y1 <- y[1:n1] X1 <- X[1:n1,] y = y1; mean.x1 = apply(X1,2,mean); x1m = sweep(X1,2,mean.x1); std.x1 = apply(x1m,2,sd) x1p = sweep(x1m,2,std.x1,"/"); x1p = x1p/sqrt(dim(x1p)[2]) w1 = matrix(rep(1,n1),ncol=1); fm0 = lmm_pxem2(y, w1,x1p, 100)