about summary refs log tree commit diff
diff options
context:
space:
mode:
authorPjotr Prins2017-10-11 12:46:28 +0000
committerPjotr Prins2017-10-13 15:27:24 +0000
commit6ae92af3335be3c6abb2588a7c8f14239a6f0a02 (patch)
treea2aae936d94894b7a755ce035f0c02863b932495
parent217158b7d141d6b4cd392435a6ac9ac6598e3859 (diff)
downloadpangemma-6ae92af3335be3c6abb2588a7c8f14239a6f0a02.tar.gz
Disable se for lmm=2, see https://github.com/genetics-statistics/GEMMA/issues/81
-rw-r--r--src/lmm.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/lmm.cpp b/src/lmm.cpp
index 8c90b28..68d3c4f 100644
--- a/src/lmm.cpp
+++ b/src/lmm.cpp
@@ -136,10 +136,10 @@ void LMM::WriteFiles() {
   auto sumstats = [&] (SUMSTAT st) {
     outfile << scientific << setprecision(6);
 
-    if (a_mode != 2)
+    if (a_mode != 2) {
       outfile << st.beta << "\t";
-
-    outfile << st.se << "\t";
+      outfile << st.se << "\t";
+    }
 
     outfile << st.logl_H1 << "\t";
 
@@ -1328,8 +1328,8 @@ void LMM::Analyze(std::function< SnpNameValues(size_t) >& fetch_snp,
       time_start = clock();
       FUNC_PARAM param1 = {false, ni_test, n_cvt, eval, Uab, ab, 0};
 
-      double lambda_mle = 0, lambda_remle = 0, beta = 0, se = 0, p_wald = 0;
-      double p_lrt = 0, p_score = 0;
+      double lambda_mle = 0.0, lambda_remle = 0.0, beta = 0.0, se = 0.0, p_wald = 0.0;
+      double p_lrt = 0.0, p_score = 0.0;
       double logl_H1 = 0.0;
 
       // 3 is before 1.