GMMLasso | R Documentation |
A Lasso-based linear mixed model with generalized method-of-moments estimation for complex phenotype prediction.
GMMLasso(y, Gen, index, K = NULL, returnK = F)
Gen |
Gen is a list where each element is a n*p genomic matrix with n subjects and p SNPs. |
index |
index is the index for testing subjects. |
K |
K is a list where each element is the kernel matrix of the corresponding genomic matrix in the list Gen. |
returnK |
returnK=T means the kernel matrix will be returned.returnK=F means the kernel matrix will not be returned. The default is returnK=F |
Y |
The continuous phenotypes of subjects. |
The prediction values and ture values for testing subjects will be returned.
The effects sizes for each genomic region can also returned.
OGen=matrix(sample(0:2,500*150,replace = TRUE),500,150) start <- seq(1, by = 3, length = ncol(OGen) / 3) Gen <- lapply(start, function(i, OGen) OGen[,i:(i+2)], OGen = OGen) y = rowSums(scale(Gen[[1]]))+rowSums(scale(Gen[[2]]))+rnorm(500) index= sample(1:length(y),100) fit=GmmLasso::GMMLasso(y=y, Gen=Gen, index=index, K = NULL, returnK = F)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.