[Genabel-commits] r1742 - branches/ProbABEL-v0.4.3-coxfix/ProbABEL/src

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Mon May 26 19:51:05 CEST 2014


Author: lckarssen
Date: 2014-05-26 19:51:04 +0200 (Mon, 26 May 2014)
New Revision: 1742

Modified:
   branches/ProbABEL-v0.4.3-coxfix/ProbABEL/src/coxph_data.cpp
Log:
In ProbABEL's Cox regression: Change the name of the variable 'setToZero' to 'setToNAN' to better reflect what it is supposed to indicate.


Modified: branches/ProbABEL-v0.4.3-coxfix/ProbABEL/src/coxph_data.cpp
===================================================================
--- branches/ProbABEL-v0.4.3-coxfix/ProbABEL/src/coxph_data.cpp	2014-05-26 17:28:26 UTC (rev 1741)
+++ branches/ProbABEL-v0.4.3-coxfix/ProbABEL/src/coxph_data.cpp	2014-05-26 17:51:04 UTC (rev 1742)
@@ -441,7 +441,7 @@
     // Check the results of the Cox fit; mirrored from the same checks
     // in coxph.fit.S and coxph.R from the R survival package.
 
-    bool setToZero = false;
+    bool setToNAN = false;
 
     // Based on coxph.fit.S lines with 'which.sing' and coxph.R line
     // with if(any(is.NA(coefficients))). These lines set coefficients
@@ -452,7 +452,7 @@
         cerr << "Warning for " << snpinfo.name[cursnp]
              << ": X matrix deemed to be singular,"
              << " setting beta and se to 'NaN'\n";
-        setToZero = true;
+        setToNAN = true;
     }
 
     if (niter >= maxiterinput)
@@ -467,7 +467,7 @@
         cerr << "Warning for " << snpinfo.name[cursnp]
              << ": Cox regression ran out of iterations and did not converge,"
              << " setting beta and se to 'NaN'\n";
-        setToZero = true;
+        setToNAN = true;
     } else {
 #if EIGEN
         VectorXd ueigen = u.data;
@@ -496,7 +496,7 @@
             // cout << "beta values for SNP: " << snpinfo.name[cursnp]
             //      << " are: " << betaeigen << std::endl;
 
-            setToZero = true;
+            setToNAN = true;
         }
 #else
         cerr << "Warning for " << snpinfo.name[cursnp]
@@ -508,7 +508,7 @@
 
     for (int i = 0; i < X.nrow; i++)
     {
-        if (setToZero)
+        if (setToNAN)
         {
             // Cox regression failed
             // sebeta[i] = NAN;



More information about the Genabel-commits mailing list