diff --git a/DESCRIPTION b/DESCRIPTION index c8fb832..768e1e9 100755 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,5 +1,5 @@ Package: BGLR -Version: 1.1.3 +Version: 1.1.4 Title: Bayesian Generalized Linear Regression Authors@R: c(person(given = "Gustavo", family = "de los Campos", diff --git a/R/BGLR.R b/R/BGLR.R index dbded8e..1a9c4a5 100644 --- a/R/BGLR.R +++ b/R/BGLR.R @@ -548,7 +548,7 @@ setLT.RKHS=function(LT,y,n,j,weights,saveAt,R2,nLT,rmExistingFiles,verbose) tmp= LT$d > LT$tolD LT$levelsU = sum(tmp) LT$d = LT$d[tmp] - LT$V = LT$V[, tmp] + LT$V = LT$V[, tmp, drop=FALSE] #Default degrees of freedom and scale parameter associated with the variance component for marker effect if (is.null(LT$df0)) diff --git a/R/Multitrait.R b/R/Multitrait.R index 85e4aad..3de89fb 100644 --- a/R/Multitrait.R +++ b/R/Multitrait.R @@ -1284,8 +1284,8 @@ Multitrait<-function(y, n<-nrow(y) - #Compute sample variance covariance matrix - Sy<-cov(y,use="pairwise.complete.obs") + #Compute sample variance covariance matrix using flashier (removing rows that have all NAs) + Sy <- mr.mash.alpha:::compute_cov_flash(y[rowSums(is.na(y)) != ncol(y), ]) Sy[is.na(Sy)]=0 #Deep copy of y, DO NOT REPLACE with y.back<-y, it does not work, both objects