GMMLasso: A Lasso-based linear mixed model with generalized...

View source: R/GMMLasso.R

GMMLassoR Documentation

A Lasso-based linear mixed model with generalized method-of-moments estimation for complex phenotype prediction.

Description

A Lasso-based linear mixed model with generalized method-of-moments estimation for complex phenotype prediction.

Usage

GMMLasso(y, Gen, index, K = NULL, returnK = F)

Arguments

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.

Value

The prediction values and ture values for testing subjects will be returned.

The effects sizes for each genomic region can also returned.

Examples

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)

XiaQiong/GMMLasso documentation built on April 4, 2022, 6:18 a.m.