From 017063cd636a3678c3c74d809c3b89b2a49d11b1 Mon Sep 17 00:00:00 2001 From: Benjamin Auder Date: Thu, 23 Feb 2017 18:43:07 +0100 Subject: [PATCH] Add a few indications for debug --- src/test/generate_test_data/helpers/EMGLLF.R | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/test/generate_test_data/helpers/EMGLLF.R b/src/test/generate_test_data/helpers/EMGLLF.R index a624156..7100f29 100644 --- a/src/test/generate_test_data/helpers/EMGLLF.R +++ b/src/test/generate_test_data/helpers/EMGLLF.R @@ -72,7 +72,8 @@ EMGLLF = function(phiInit,rhoInit,piInit,gamInit,mini,maxi,gamma,lambda,X,Y,tau) pi2AllPositive = all(pi2 >= 0) kk = kk+1 } - + +#if (ite==2) browser() #t[m] la plus grande valeur dans la grille O.1^k tel que ce soit décroissante ou constante while( kk < 1000 && -a/n + lambda * sum(pi^gamma * b) < -sum(gam2 * log(pi2))/n + lambda * sum(pi2^gamma * b) ) @@ -95,6 +96,8 @@ EMGLLF = function(phiInit,rhoInit,piInit,gamInit,mini,maxi,gamma,lambda,X,Y,tau) } ps[mm,r] = sum(ps1[,mm,r]) nY2[mm,r] = sum(nY21[,mm,r]) + +#TODO: debug rho computation rho[mm,mm,r] = (ps[mm,r]+sqrt(ps[mm,r]^2+4*nY2[mm,r]*gam2[r])) / (2*nY2[mm,r]) } } -- 2.44.0