From 2fd99cb062309eee1c81d92f7dcac9bd446254e5 Mon Sep 17 00:00:00 2001
From: Vincent  LAVILLE <vincent.laville@pasteur.fr>
Date: Fri, 25 Jan 2019 14:37:48 +0100
Subject: [PATCH] Change tol param in ginv

---
 R/varExp.R | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/R/varExp.R b/R/varExp.R
index 61c1403..e5089c7 100644
--- a/R/varExp.R
+++ b/R/varExp.R
@@ -163,7 +163,7 @@ calculateVarExp <- function(std_bG, std_bI, matcor, varY, N, type) {
         stop("type must be in c(\"G\", \"I\", \"J\")", call. = FALSE)
     }
     q <- qr(matcor)$rank
-    inv <- ginv(matcor, tol = 0.1)
+    inv <- ginv(matcor, tol = 0.0001)
     return((N * (crossprod(t(crossprod(std_bG, inv)), std_bG) + 
                      crossprod(t(crossprod(std_bI, inv)), std_bI)) -
                 q) / ((N - q) * varY))
-- 
GitLab